RE: [PHP] Re: MIME help needed please...

2003-02-26 Thread Steve Jackson
I just sorted a similar problem I was having.
Basically make sure that the file your trying to send is Chmod'ed so
that the mail() can actually execute not just read. I was having the
same problem where any email I was attaching a file to (in this case a
PDF) was attaching the file fine but only the headers so I was receiving
a PDF type document but with no information in it. 

I chmodded the file to  and it works fine.
I also made use of this script:
// uses mime_mail() class from functions.php
$msg = This is a PDF e-mail;
$attachment = fread(fopen(db/webopman.pdf, r),
filesize(db/webopman.pdf)); 

$mail = new mime_mail();
$mail-from = [EMAIL PROTECTED];
$mail-headers = Errors-To: [EMAIL PROTECTED];
$mail-to = $email;
$mail-subject = Thanks for downloading our attachment;
$mail-body = $msg;
$mail-add_attachment($attachment, webopman.pdf,
application/pdf);
$mail-send();

Calling this class:
/*
* Class mime_mail
* Original implementation by Sascha Schumann [EMAIL PROTECTED]
* Modified by Tobias Ratschiller [EMAIL PROTECTED]:
* - General code clean-up
* - separate body- and from-property
* - killed some mostly un-necessary stuff
*/ 

class mime_mail 
{
var $parts;
var $to;
var $from;
var $headers;
var $subject;
var $body;

/*
* void mime_mail()
* class constructor
*/ 
function mime_mail()
{
$this-parts = array();
$this-to = ;
$this-from = ;
$this-subject = ;
$this-body = ;
$this-headers = ;
}

/*
* void add_attachment(string message, [string name], [string ctype])
* Add an attachment to the mail object
*/ 
function add_attachment($message, $name = , $ctype =
application/octet-stream)
{
$this-parts[] = array (
ctype = $ctype,
message = $message,
encode = $encode,
name = $name
);
}

/*
* void build_message(array part=
* Build message parts of an multipart mail
*/ 
function build_message($part)
{
$message = $part[ message];
$message = chunk_split(base64_encode($message));
$encoding = base64;
return Content-Type: .$part[ ctype].
($part[ name]? ; name = \.$part[ name]. \ : ).
\nContent-Transfer-Encoding: $encoding\n\n$message\n;
}

/*
* void build_multipart()
* Build a multipart mail
*/ 
function build_multipart() 
{
$boundary = b.md5(uniqid(time()));
$multipart = Content-Type: multipart/mixed; boundary =
$boundary\n\nThis is a MIME encoded message.\n\n--$boundary;

for($i = sizeof($this-parts)-1; $i = 0; $i--) 
{
$multipart .= \n.$this-build_message($this-parts[$i]).
--$boundary;
}
return $multipart.= --\n;
}

/*
* void send()
* Send the mail (last class-function to be called)
*/ 
function send() 
{
$mime = ;
if (!empty($this-from))
$mime .= From: .$this-from. \n;
if (!empty($this-headers))
$mime .= $this-headers. \n;

if (!empty($this-body))
$this-add_attachment($this-body, , text/html); 
$mime .= MIME-Version: 1.0\n.$this-build_multipart();
mail($this-to, $this-subject, , $mime);
}
}; // end of class 
?

Hope this solves the issue.

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





 -Original Message-
 From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
 Sent: 26. helmikuuta 2003 3:51
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: MIME help needed please...
 
 
 Hello,
 
 On 02/23/2003 08:01 PM, Shawn McKenzie wrote:
  I got this from the user contributed notes in the php.net 
 manual.  It 
  seems to work fine most of the time, but Eudora and Pegasus users 
  either get mangled attachments or no attachments.
  
  Can anyone see a problem (most files are zip, but sometimes 
 tar.gz or 
  sit) I tried using Content-Type: application/zip with the same 
  results.  I'm thinking it is some issue with the headers, 
  content-types, boundaries or something.  Or maybe 
 Pegasus/Eudora don't 
  understand MIME or base64 (doubtful)???
 
 It could be one of many bugs of the mail() function.
 
 You may want to try this class for composing and sending MIME 
 messages 
 as it works around some of those bugs:
 
http://www.phpclasses.org/mimemessage

-- 

Regards,
Manuel Lemos


-- 
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] to Bryan Lipscy Re: [PHP] how___??

2003-02-26 Thread Ernest E Vogelsinger
At 00:52 26.02.2003, Luis A said:
[snip]
MEN I DONT HAVE INTERNET ACCESS

thanks anyway

if some one else can help m e please
[snip] 

Interesting case.

Sending email without internet access is something you should get patented;
it could make you rich...

FWIW, use the same channel you're using to transmit email to the group to
get some _basic_ information from the online docs, PLEASE.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] Include files

2003-02-26 Thread Ernest E Vogelsinger
At 01:34 26.02.2003, Kenneth Suralta said:
[snip]
How do I include external library files in PHP???
I would like to put the lines that are repeated in each php files, in a 
separate file.
e.g.
?php
$db_host = localhost;
$db_port = 3306;
$db_name = test;
...
?
[snip] 

Haven't I heard that before?
http://www.php.net/manual/en/function.include.php


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] no session id

2003-02-26 Thread Ernest E Vogelsinger
At 01:39 26.02.2003, php said:
[snip]
this code doesn't ouput a session-id.
is the code right? and if not, any suggestions what's wrong?
i'm new into sessions, so forgive me for stupid questions..
thanx
michiel

?
session_start ();
Header(Content-Type: text/html);
echo session id:  . $session_id;
?
[snip] 

The session ID is not contained in a global variable, but you can retrieve
it using the session_id() function:

echo session id:  . session_id();

For more information on session related functions refer to
http://www.php.net/manual/en/ref.session.php


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] file upload and a browse for file box

2003-02-26 Thread Ernest E Vogelsinger
At 02:32 26.02.2003, Sunfire said:
[snip]
i looked in the manual about file uploads and basically know how it works
other than a little playing around with it but was wondering how you could
make a browse for file button that opens a box on the users computer so then
can look for the file rather than type it in.. or is this something with
java/javascript that i have to find out elsewhere
[snip] 

using input type=file in your form will give you the results you need.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] Session SID curio

2003-02-26 Thread Ernest E Vogelsinger
At 08:22 26.02.2003, Bryan Lipscy said:
[snip]
I ran into a weird curiosity playing with sessions.

Consider this working code:
? 
   session_start();
   echo Session ID == .SID;
?
[snip] 

The SID constant contains the session identifier that is to be added to a
link, IF NECESSARY.

This said: PHP normally uses cookies to transfer the session ID to the
client browser (controlled by the ini file setting session.use_cookies).
If the client browser returns a session cookie there's no need for PHP to
rewrite the URL links, thus SID is empty. If the client browser does NOT
return a session cookie, SID contains the necessary information for URL
rewriting.

If you need to generate the SID value regardless of cookie/non-cookie
settings, use
$sid = session_name() . '=' . session_id();

All this can be found at http://www.php.net/manual/en/ref.session.php and
the following pages.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] String searching peformance

2003-02-26 Thread {R}ichard Ashton
On Mon, 24 Feb 2003 22:35:35 +0100, Ernest E Vogelsinger wrote:

At 21:22 24.02.2003, {R}ichard Ashton spoke out and said:
[snip]
while ( $flag == true )
if (strpos($body, $word[])  0) {$flag=false}

What I really need to know is which is the fastest loop?
Which is the fastest match, strpos?
Which is the fastest comparison?
What other optimisations are possible to maximise search speed?

I would expect to keep a frequency hit count and sort the $words[] so
that the most frequent hits are found first, remembering that only
$body with NO $words in then are automatically posted, so every word
must be tested.

I don't know sufficient internals to pick the fastest method. I will be
running with 4.3.1 on FreeBSD 4.6
[snip] 

I'd suggest something like this:

$buzzwords = array('idiot', 'fool', 'shit', 'FOAD');

$re = '/(' . implode('|',$buzzwords).')/is';
if (preg_match($re, $posting))
// bad word found
else
// cleared

Thank you very much that is brilliant, I would never have thought of
that. 

Do you think that:

if (preg_match($re, $posting, $hits)) would slow it down at all. The
$buzzwords will be kept in a file to be loaded before each run, every 5
minutes. I could therefore keep a count of which words hit most
frequently and move them to the top of the list.

{R}


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



Re: [PHP] String searching peformance

2003-02-26 Thread Ernest E Vogelsinger
At 09:49 26.02.2003, {R}ichard Ashton said:
[snip]
Do you think that:

if (preg_match($re, $posting, $hits)) would slow it down at all. The
$buzzwords will be kept in a file to be loaded before each run, every 5
minutes. I could therefore keep a count of which words hit most
frequently and move them to the top of the list.
[snip] 

If you have a lot of buzzwords I believe this could make quite some
performance impact.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



[PHP] header and writing problem

2003-02-26 Thread George Pitcher
Hi all,

Back on the list after a long break.

I want to be able to write all my sql queries (well at least the ones that
change or create records) to a log file.

However some of the pages that contain these queries are just used to
redirect the user depending on the result.

Writing to a file id not permitted before creating the header for the
redirect.

can anyone suggest a workaround.

Cheers

George


===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T  +44 (0)1865 799137 direct
T  +44 (0)1865 799000 switchboard
F  +44 (0)1865 799134
E  [EMAIL PROTECTED]

www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.


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



Re: [PHP] header and writing problem

2003-02-26 Thread Ernest E Vogelsinger
At 10:02 26.02.2003, George Pitcher said:
[snip]
Hi all,

Back on the list after a long break.

I want to be able to write all my sql queries (well at least the ones that
change or create records) to a log file.

However some of the pages that contain these queries are just used to
redirect the user depending on the result.

Writing to a file id not permitted before creating the header for the
redirect.
[snip] 

This works for me:

?php
$hf = fopen('cache/sample.txt', 'w');
fwrite($hf, 'Test');
fclose($hf);
header('Location: http://www.php.net/');
?

(./cache is an apache-writable directory on my test server)

This seamlessly writes the file, then redirects to the requested site...
what errors do you get?


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



RE: [PHP] header and writing problem

2003-02-26 Thread Niklas Lampén
I think this can be done with mySQL (if you're using it) log-files.


Niklas

-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED] 
Sent: 26. helmikuuta 2003 11:02
To: [EMAIL PROTECTED]
Subject: [PHP] header and writing problem


Hi all,

Back on the list after a long break.

I want to be able to write all my sql queries (well at least the ones that
change or create records) to a log file.

However some of the pages that contain these queries are just used to
redirect the user depending on the result.

Writing to a file id not permitted before creating the header for the
redirect.

can anyone suggest a workaround.

Cheers

George


===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T  +44 (0)1865 799137 direct
T  +44 (0)1865 799000 switchboard
F  +44 (0)1865 799134
E  [EMAIL PROTECTED]

www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.


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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail. For
more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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



RE: [PHP] header and writing problem

2003-02-26 Thread George Pitcher
Ernest,

That worked a treat, many thanks.

George

 -Original Message-
 From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]
 Sent: 26 February 2003 9:16 am
 To: George Pitcher
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] header and writing problem
 
 
 At 10:02 26.02.2003, George Pitcher said:
 [snip]
 Hi all,
 
 Back on the list after a long break.
 
 I want to be able to write all my sql queries (well at least the 
 ones that
 change or create records) to a log file.
 
 However some of the pages that contain these queries are just used to
 redirect the user depending on the result.
 
 Writing to a file id not permitted before creating the header for the
 redirect.
 [snip] 
 
 This works for me:
 
 ?php
 $hf = fopen('cache/sample.txt', 'w');
 fwrite($hf, 'Test');
 fclose($hf);
 header('Location: http://www.php.net/');
 ?
 
 (./cache is an apache-writable directory on my test server)
 
 This seamlessly writes the file, then redirects to the requested site...
 what errors do you get?
 
 
 -- 
O Ernest E. Vogelsinger
(\)ICQ #13394035
 ^ http://www.vogelsinger.at/
 
 
 

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



Re: [PHP] String searching peformance

2003-02-26 Thread Jason Wong
On Wednesday 26 February 2003 16:49, {R}ichard Ashton wrote:

 Do you think that:

 if (preg_match($re, $posting, $hits)) would slow it down at all. The
 $buzzwords will be kept in a file to be loaded before each run, every 5
 minutes. I could therefore keep a count of which words hit most
 frequently and move them to the top of the list.

No idea whether this would be faster (it's certainly easier to code):

  explode() text into an array
  place your banned words into an array
  array_intersect() to find words common in both

Do your own benchmarking!

-- 
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
--
/*
Why is the alphabet in that order?  Is it because of that song?
-- Steven Wright
*/


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



[PHP] gethostbyaddr woes

2003-02-26 Thread erich
for some reason i cannot retrieve a hostname using gethostbyaddr().

if it helps, my host is http://phpwebhosting.com/. i have asked them 
countless times if it is something on their end causing this and have 
been told that it works for them and i must be doing
something wrong. any suggestions?

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


[PHP] what are the planned features of php 5?

2003-02-26 Thread neko
I read something a while back about more OO features, but I was wondering if
there is a roadmap anywhere?

cheers,
neko



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



[PHP] RE: PHP, Windows and COM.

2003-02-26 Thread Wez Furlong
[Note: To/CC headers trimmed]

// Create a VT_EMPTY value
$empty = new VARIANT();

GoTo(wdGoToBookmark, $empty, $empty, BookmarkName);

On Wed, 26 Feb 2003, Richard Quadling wrote:

 Hi Harald.

 The problem with some of the VBA functions is that the first and last
 parameter need to be set and the ones in the middle have no meaning and
 cannot be present. This can only be achieved by using named parameters. The
 GoTo method, as a function, in VBA would be ...

 GoTo(wdGoToBookmark,,,BookmarkName)



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



Re: [PHP] gethostbyaddr woes

2003-02-26 Thread Ferhat Can
Hi Eric,
You can test the gethostbyaddr function using the following script:
?php
  echo gethostbyaddr(64.29.28.221);
 ?
It outputs 'mole.phpwebhosting.com' on my system. If it doesn't work the
same way for you, then there may be trouble with the phpwebhosting.

- Original Message -
From: erich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 12:50
Subject: [PHP] gethostbyaddr woes


 for some reason i cannot retrieve a hostname using gethostbyaddr().

 if it helps, my host is http://phpwebhosting.com/. i have asked them
 countless times if it is something on their end causing this and have
 been told that it works for them and i must be doing
 something wrong. any suggestions?


 --
 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] what are the planned features of php 5?[Scanned]

2003-02-26 Thread Michael Egan
Neko,

Out of curiosity I had a look at the php.net site and related sites and eventually 
came across this link:

http://www.zend.com/images/press/Feb_2003-4_Zeev_PHP5.pdf

I think this gives the details you're after.

Michael Egan

-Original Message-
From: neko [mailto:[EMAIL PROTECTED]
Sent: 26 February 2003 10:58
To: [EMAIL PROTECTED]
Subject: [PHP] what are the planned features of php 5?[Scanned]


I read something a while back about more OO features, but I was wondering if
there is a roadmap anywhere?

cheers,
neko



-- 
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] Re: problem with ftp browsing

2003-02-26 Thread Sascha Ende \[GetContent\]
I have the same problem, too. But I didnt found out why...

--
MFG
Sascha Ende
Matt [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 I have a php script that is like and ftp client, only is just browsers the
 server and displays file names and folders.  If you click on the name of a
 folder that it displays, it will then display the files and folders inside
 that directory, and so on for all directories.  It works perfectly when I
 connect to my internet hosting company through ftp to browse, but it
doesn't
 work right when I connect to my personal ftp server.  I have tried using
 both Serv-U and Bulletproof ftp servers to host my ftp site.  The script
 won't display my server correctly with either of these.  Can anyone give
me
 some advice?  I would really appreciate it.  Thanks.

 Matt





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



[PHP] ldap modify + add problem

2003-02-26 Thread Jim Greene
Hello,
	I seem to be having a problem with doing an ldap_add and a modify in 
the same script. I assumed if I did an unbind after my modify I should 
be fine but it seems to not work still. Below is the script. Thanks

?php

// LDAP variables
$ldaphost = ldap.server;  // your ldap servers
$ldapport = 389; // your ldap server's port number
$ldaprdn  = cn=Directory Manager; // ldap rdn or dn
$ldappass = test123;  // associated password
$dn2=uid=default, ou=Users, dc=megalink, dc=net;
// Connecting to LDAP
$ldapconn = ldap_connect( $ldaphost, $ldapport )
or die(Could not connect to LDAP server.);
// connect to ldap server

if ($ldapconn) {

// binding to ldap server
$ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);
// verify binding
if ($ldapbind) {
echo LDAP bind successful...\n;
$result=ldap_search($ldapconn,ou=Users,dc=megalink,dc=net, u
id=default);
$info = ldap_get_entries($ldapconn, $result);
$defaultUid = $info[0][uidnumber][0];
//print $defaultUid;
//print $info[0][uidnumber][0];
$newUid=$defaultUid+1;
print $newUid\n;
$newinfo[uidNumber]=$newUid;
ldap_modify($ldapconn,$dn2,$newinfo);
echo LDAP Modify successful...\n;
ldap_unbind($ldapconn);
} else {
echo LDAP bind failed...;
}
}

//require_once (ldap-search-uid.php);
$dn=cn=Directory Manager;
$bindPassword = test123;
$mySalt = substr(
ereg_replace([^a-zA-Z0-9./],,
crypt(rand(1000,), rand(10,99))),
2, 2);
$password = crypt(l8rd00dZ,$mySalt);
$info[loginShell]=/bin/false;
$info[uidNumber]=1002;
$info[gidNumber]=100;
$info[objectClass][0]=posixAccount;
$info[objectClass][1]=top;
$info[uid]=test2;
$info[gecos]=test;
$info[cn]=test2;
$info[homeDirectory]=/home/test1;
$info[userPassword]={crypt}test123;
if (($ldap = ldap_connect(ldap.server,389))) {
echo Bind Good...\n;
}
else {
echo Connection Failed...\n;
}
if (($res = @ldap_bind($ldap, $dn, $bindPassword))) {
ldap_add($ldap, uid=test2, ou=Users, dc=megalink, dc=net, $info);
echo User Added...\n;
}
else {
echo Addition Failed...\n;
}
?
Jim G

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


RE: [PHP] what are the planned features of php 5?

2003-02-26 Thread Dan Hardiker
 I read something a while back about more OO features, but I was
 wondering if there is a roadmap anywhere?

 Out of curiosity I had a look at the php.net site and related sites and
 eventually came across this link:

 http://www.zend.com/images/press/Feb_2003-4_Zeev_PHP5.pdf

I think this is more in the realm of what your looking for:

http://www.php.net/ZEND_CHANGES.txt

-- 
Dan Hardiker [EMAIL PROTECTED]
ADAM Software  Systems Engineer
First Creative



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



RE: [PHP] what are the planned features of php 5?[Scanned]

2003-02-26 Thread Brad Young
You can also view the recorded on-line seminars that Zeev gave, which go into even 
more detail.

http://www.zend.com/iseminar.php
The Future of PHP and the Zend Engine 2
The Future of PHP and the Zend Engine 2 - Part 2 Examples and tutorials 

Brad

-Original Message-
From: Michael Egan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 2:19 PM
To: neko; [EMAIL PROTECTED]
Subject: RE: [PHP] what are the planned features of php 5?[Scanned]


Neko,

Out of curiosity I had a look at the php.net site and related 
sites and eventually came across this link:

http://www.zend.com/images/press/Feb_2003-4_Zeev_PHP5.pdf

I think this gives the details you're after.

Michael Egan

-Original Message-
From: neko [mailto:[EMAIL PROTECTED]
Sent: 26 February 2003 10:58
To: [EMAIL PROTECTED]
Subject: [PHP] what are the planned features of php 5?[Scanned]


I read something a while back about more OO features, but I was 
wondering if
there is a roadmap anywhere?

cheers,
neko




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



Re: [PHP] simple problem about authentication

2003-02-26 Thread Oliver Witt
1lt John W. Holmes schrieb:

  I'm trying to set up a password section on my website. But I don't want
  a window popping up asking for a username and password. I'd rather like
  to have a form that submits the data. I did that and it works fine, but
  the browser seems to not save the username and password, because if i
  click on any link, it returns an unauthorized message... any ideas?
  thnx,

 Show some code... the possibilities are endless for what you're doing wrong.

 ---John Holmes...

ok, here's the code:

the form submits the user name and password in the variables $user and $pw to
another site, which includes this:

if(isset($user)  isset($pw)){
$user = ucwords(strtolower($user));
$PHP_AUTH_USER = $user;
$PHP_AUTH_PW = $pw;}

if(isset($PHP_AUTH_USER)){
$result = mysql_query(select * from _users where user = '$PHP_AUTH_USER');
$_user = mysql_fetch_array($result);}

if(!isset($PHP_AUTH_USER)) {
header('HTTP/1.0 401 Unauthorized');
echo('unauthorized');
exit;}
else{
$result = mysql_query(select * from _users where user = '$PHP_AUTH_USER') or
die('Error occured while connecting to database');
$rows = mysql_num_rows($result);
if($rows == 0){
header('HTTP/1.0 401 Unauthorized');
echoscriptwindow.location.href='../index.php?action=user_wrong'/script;
exit;}
else{
$daten = mysql_fetch_array($result);
if($PHP_AUTH_PW == $daten['pw']){
// authorized
}
else{
header('HTTP/1.0 401 Unauthorized');
echoscriptwindow.location.href='../index.php?action=pw_wronguser=$user'/script;

exit;}}}

And this works fine for just this page. Whenever I click on a link to a page
which includes the same file though, it echoes 'unauthorized'...
Olli


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



[PHP] Problem wit doing ldap_add and modify in same script

2003-02-26 Thread Jim Greene
Strange problem: Taking the 2 halfs of the scripts (the section to update uidNumber 
and the one to add the user) and combining them causes
an error:
Fatal error: ldap_add() [http://www.php.net/function.ldap-add]: Unknown attribute in 
the data in /home/jwgreene/ldap-add.php on line 68

Yes doing them as 2 seperate scripts works fine. I did read something about not being 
able to do a modify, and add in the same statment, so I do a ldap_unbind after the 
completion
of the first. Still does the same thing. Any help would be appreciated.. Thanks


?php

// LDAP variables
$ldaphost = ldap.server;  // your ldap servers
$ldapport = 389; // your ldap server's port number
$ldaprdn  = cn=Directory Manager; // ldap rdn or dn
$ldappass = test123;  // associated password
$dn2=uid=default, ou=Users, dc=megalink, dc=net;

// Connecting to LDAP
$ldapconn = ldap_connect( $ldaphost, $ldapport )
or die(Could not connect to LDAP server.);

// connect to ldap server

if ($ldapconn) {

// binding to ldap server
$ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);

// verify binding
if ($ldapbind) {
echo LDAP bind successful...\n;
$result=ldap_search($ldapconn,ou=Users,dc=megalink,dc=net, u
id=default);
$info = ldap_get_entries($ldapconn, $result);
$defaultUid = $info[0][uidnumber][0];
//print $defaultUid;
//print $info[0][uidnumber][0];
$newUid=$defaultUid+1;
print $newUid\n;
$newinfo[uidNumber]=$newUid;
ldap_modify($ldapconn,$dn2,$newinfo);
echo LDAP Modify successful...\n;
ldap_unbind($ldapconn);

} else {
echo LDAP bind failed...;
}

}
//Second half of script *works by itself*
$dn=cn=Directory Manager;
$bindPassword = test123;
$mySalt = substr(
ereg_replace([^a-zA-Z0-9./],,
crypt(rand(1000,), rand(10,99))),
2, 2);
$password = crypt(test123,$mySalt);

$info[loginShell]=/bin/false;
$info[uidNumber]=1002;
$info[gidNumber]=100;
$info[objectClass][0]=posixAccount;
$info[objectClass][1]=top;
$info[uid]=test2;
$info[gecos]=test;
$info[cn]=test2;
$info[homeDirectory]=/home/test1;
$info[userPassword]={crypt}test123;
if (($ldap = ldap_connect(ldap.server,389))) {
echo Bind Good...\n;
}
else {
echo Connection Failed...\n;
}
if (($res = @ldap_bind($ldap, $dn, $bindPassword))) {
ldap_add($ldap, uid=test2, ou=Users, dc=megalink, dc=net, $info);
echo User Added...\n;
}
else {
echo Addition Failed...\n;
}
?

Jim G


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



Re: [PHP] simple problem about authentication

2003-02-26 Thread Ernest E Vogelsinger
At 14:22 26.02.2003, Oliver Witt spoke out and said:
[snip]
if(isset($user)  isset($pw)){
$user = ucwords(strtolower($user));
$PHP_AUTH_USER = $user;
$PHP_AUTH_PW = $pw;}

[more...]
And this works fine for just this page. Whenever I click on a link to a page
which includes the same file though, it echoes 'unauthorized'...
[snip]

Sounds like you're using sessions... perhaps register_globals is off in
your environment, so session variables are not registered? How do you set
the $user and $pw variables?
 

-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


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



[PHP] checking if module exists

2003-02-26 Thread Jun
I want my script to compress the output using gzip library. But before that,
I want to check if gzip library is enabled before calling the compression
functions... How do I do that?


jun



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



Re: [PHP] Re: problem with ftp browsing

2003-02-26 Thread Mat Harris
i hae found many times that there can be significant differences between
commands of windows ftp server and grown up ftp servers.

It would be advisable to trap every piece of output you can as i took us
days last time to find the glich. no more windows for us

On Wed, Feb 26, 2003 at 01:50:24 +0100, Sascha Ende [GetContent] wrote:
 I have the same problem, too. But I didnt found out why...
 
 -- 
 MFG
 Sascha Ende
 Matt [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]
  I have a php script that is like and ftp client, only is just browsers the
  server and displays file names and folders.  If you click on the name of a
  folder that it displays, it will then display the files and folders inside
  that directory, and so on for all directories.  It works perfectly when I
  connect to my internet hosting company through ftp to browse, but it
 doesn't
  work right when I connect to my personal ftp server.  I have tried using
  both Serv-U and Bulletproof ftp servers to host my ftp site.  The script
  won't display my server correctly with either of these.  Can anyone give
 me
  some advice?  I would really appreciate it.  Thanks.
 
  Matt
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]   www.genestate.com   


pgp0.pgp
Description: PGP signature


Fw: [PHP] checking if module exists

2003-02-26 Thread Rick Emery
Write a test script and run it on the target server. If it crashes, it's not enabled.

- Original Message - 
From: Jun [EMAIL PROTECTED]
To: 
Sent: Wednesday, February 26, 2003 7:38 AM
Subject: [PHP] checking if module exists


I want my script to compress the output using gzip library. But before that,
I want to check if gzip library is enabled before calling the compression
functions... How do I do that?


jun



-- 
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] to holmes Re: [PHP] mysql trouble

2003-02-26 Thread Luis A
how is that ??
- Original Message -
From: John W. Holmes [EMAIL PROTECTED]
To: 'Luis A' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 8:07 PM
Subject: RE: [PHP] mysql trouble


  take a look at this
  ?php
  // process form
  $link = mysql_connect(localhost, root);
  mysql_select_db(mydb,$db);
  $sql = INSERT INTO agenda (nombre, direccion, telefono, email)  +
VALUES ('$nombre', '$direccion', '$telefono', '$email');
  $result = mysql_query($sql);

 You use a period (.) to concatenate strings, not a plus (+) symbol.

 If you displayed $sql, like you should when you're debugging your
 script, you'd of realized this a long time ago.

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/



 --
 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] to holmes Re: [PHP] mysql trouble

2003-02-26 Thread Luis A
you mean  i do not need to put the pus on the end of the function

(+)   i dont need to put there that?


- Original Message -
From: John W. Holmes [EMAIL PROTECTED]
To: 'Richard Whitney' [EMAIL PROTECTED]; 'Luis A'
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 8:21 PM
Subject: RE: [PHP] mysql trouble


  ### ?php
  ### // process form
  ### $link = mysql_connect(localhost, root);
  you need to have the password as the third argument
  $link = mysql_connect(localhost, root, password);
 
  Also, why is it in a variable?
  Just make it:
  mysql_connect(localhost, root, password);

 Sometime there are users that do not have a password. Every parameter to
 mysql_connect() is optional, by the way.

 Also, you want to assign the result of mysql_connect() to a variable so
 you can tell the connections apart. If you only have one connection per
 script, then it's not a big deal. But, if you connect to several
 databases, then you need that result to tell them apart when you do
 queries later so PHP knows what connection to send your query through.

  ### mysql_select_db(mydb,$db);
  ### $sql = INSERT INTO agenda (nombre, direccion, telefono, email) 
 +

 Problem is the plus (+) sign at the end of this line.

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/



 --
 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] to holmes Re: [PHP] mysql trouble

2003-02-26 Thread Niklas Lampén
No, he doesn't mean that.

You are doing:
$String = text  + more text;
while you should be doing:
$String = text  . more text;


Niklas

-Original Message-
From: Luis A [mailto:[EMAIL PROTECTED] 
Sent: 26. helmikuuta 2003 16:09
To: [EMAIL PROTECTED]
Subject: [PHP] to holmes Re: [PHP] mysql trouble


you mean  i do not need to put the pus on the end of the function

(+)   i dont need to put there that?


- Original Message -
From: John W. Holmes [EMAIL PROTECTED]
To: 'Richard Whitney' [EMAIL PROTECTED]; 'Luis A'
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 8:21 PM
Subject: RE: [PHP] mysql trouble


  ### ?php
  ### // process form
  ### $link = mysql_connect(localhost, root);
  you need to have the password as the third argument
  $link = mysql_connect(localhost, root, password);
 
  Also, why is it in a variable?
  Just make it:
  mysql_connect(localhost, root, password);

 Sometime there are users that do not have a password. Every parameter 
 to
 mysql_connect() is optional, by the way.

 Also, you want to assign the result of mysql_connect() to a variable 
 so you can tell the connections apart. If you only have one connection 
 per script, then it's not a big deal. But, if you connect to several 
 databases, then you need that result to tell them apart when you do 
 queries later so PHP knows what connection to send your query through.

  ### mysql_select_db(mydb,$db);
  ### $sql = INSERT INTO agenda (nombre, direccion, telefono, email) 
  
 +

 Problem is the plus (+) sign at the end of this line.

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your 
 copy today. http://www.phparch.com/



 --
 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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail. For
more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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



Re: [PHP] to paulm Re: [PHP] mysql trouble

2003-02-26 Thread Luis A
i know

the sql server in default does not have password


- Original Message -
From: paulm [EMAIL PROTECTED]
To: Luis A [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 8:06 PM
Subject: Re: [PHP] to paulm Re: [PHP] mysql trouble


 k but you still need to do  insted of password, and see if you have a
sql
 password for root, it's not system password
 - Original Message -
 From: Luis A [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, February 26, 2003 2:21 AM
 Subject: [PHP] to paulm Re: [PHP] mysql trouble


 hey i think the root does not need password to connect to mysql

 or yes 

 on my server the root user does not have password
 thats why i dont know why he does not update the database?

 - Original Message -
 From: paulm [EMAIL PROTECTED]
 To: Luis A [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 6:48 PM
 Subject: Re: [PHP] mysql trouble


  you don't have a password for root in mysql_connect
  - Original Message -
  From: Luis A [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, February 26, 2003 1:04 AM
  Subject: [PHP] mysql trouble
 
 
  hi pasl i got a troblem here
 
 
  if some one can help me ?
 
  take a look at this
  ?php
  // process form
  $link = mysql_connect(localhost, root);
  mysql_select_db(mydb,$db);
  $sql = INSERT INTO agenda (nombre, direccion, telefono, email)  +
VALUES ('$nombre', '$direccion', '$telefono', '$email');
  $result = mysql_query($sql);
  echo ¡Gracias! Hemos recibido sus datos.\n;
 
  ?
 
 
 
  HE DOES NOT WORKING
 
  any subjest ?
 
 



 --
 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] Include files

2003-02-26 Thread David Eisenhart
if require is used to include the 'same file', say, twice that file will be
loaded twice. This can of course cause errors (such as resulting from the
redefinition of functions within this file). In contrast the require_once
construct will only load a file 'once' irrespective of the number of times
it is subsequently called to do so (thereby preventing such errors arising).

I would imagine (but am not certain) that there may be a slight speed
penalty in using require_once as opposed to require.

David


Jinky Otacan Cocalon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 the problem was solved by creating an include file and using using
 require() method

 i was just wondering what are the advantages and disadvantages of using
 require_once() instead of require()?

 thanx =)




 John W. Holmes wrote:
 How do I include external library files in PHP???
 I would like to put the lines that are repeated in each php files, in
 
  a
 
 separate file.
 e.g.
 ?php
 $db_host = localhost;
 $db_port = 3306;
 $db_name = test;
 ...
 ?
 
 
  Just throw caution to the wind and try the include() function I'm
  not responsible for the consequences!!! Do not blame me if your file is
  included!!
 
  ---John W. Holmes...
 
  PHP Architect - A monthly magazine for PHP Professionals. Get your copy
  today. http://www.phparch.com/
 
 
 

 --

 Gravity can't be held responsible for people falling in love.




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



Re: [PHP] getimagesize() issues starting with PHP 4.3..

2003-02-26 Thread Jason DiCioccio


--On Wednesday, February 26, 2003 16:35 +1000 Tom Rogers 
[EMAIL PROTECTED] wrote:

Hi,

Wednesday, February 26, 2003, 2:27:10 PM, you wrote:
JD Can anyone reproduce this problem?
[...]
JD ?
JD
$retval=getimagesize('http://armanii.c.crosslink.net/arcticsilver/dtmsig4
.j JD pg');
JD echo $retval[0] $retval[1] $retval[3] \n\n\n;
?
[...]
Try
$retval=getimagesize(http://armanii.c.crosslink.net/arcticsilver/dtmsig4
.jpg,$info);
..seems to wake it up :) ..possible bug??

--
regards,
Tom
Thanks!  It would appear so, as it's documented as being an optional 
argument..  It works for me that way too, though.

Cheers,
-JD-
--
Jason DiCioccio - [EMAIL PROTECTED]  - Useless .sig
Open Domain Service - [EMAIL PROTECTED]- http://www.ods.org/
Ruby- [EMAIL PROTECTED]   - http://www.ruby-lang.org/
PGP Fingerprint - C442 04E2 26B0 3809 8357  96AB D350 9596 0436 7C08

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


Re: [PHP] checking if module exists

2003-02-26 Thread Chris Boget
 I want my script to compress the output using gzip library. But before that,
 I want to check if gzip library is enabled before calling the compression
 functions... How do I do that?

You can try extension_loaded();

Chris


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



Re: [PHP] checking if module exists

2003-02-26 Thread Marek Kilimajer
function_exists() -- checks if a function exists

Jun wrote:

I want my script to compress the output using gzip library. But before that,
I want to check if gzip library is enabled before calling the compression
functions... How do I do that?
jun



 



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


[PHP] resizing .jpg file in php

2003-02-26 Thread Anthony Ritter
I'd like to use (with permission) .jpg files from a webcam from another URL.

Once that URL is opened and read via PHP as a file into my site is it
possible to resize that image?   It measures 640 x 480 pixels and I would
like to reduce the image size by 25%.

Thank you.
Tony Ritter




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



Re: [PHP] niklasRe: [PHP] mysql trouble

2003-02-26 Thread Luis A
oh   IN GONNA TRY NOW

thanks

i scream againg if present truble )

- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 9:13 AM
Subject: RE: [PHP] to holmes Re: [PHP] mysql trouble


 No, he doesn't mean that.

 You are doing:
 $String = text  + more text;
 while you should be doing:
 $String = text  . more text;


 Niklas

 -Original Message-
 From: Luis A [mailto:[EMAIL PROTECTED]
 Sent: 26. helmikuuta 2003 16:09
 To: [EMAIL PROTECTED]
 Subject: [PHP] to holmes Re: [PHP] mysql trouble


 you mean  i do not need to put the pus on the end of the function

 (+)   i dont need to put there that?


 - Original Message -
 From: John W. Holmes [EMAIL PROTECTED]
 To: 'Richard Whitney' [EMAIL PROTECTED]; 'Luis A'
 [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 8:21 PM
 Subject: RE: [PHP] mysql trouble


   ### ?php
   ### // process form
   ### $link = mysql_connect(localhost, root);
   you need to have the password as the third argument
   $link = mysql_connect(localhost, root, password);
  
   Also, why is it in a variable?
   Just make it:
   mysql_connect(localhost, root, password);
 
  Sometime there are users that do not have a password. Every parameter
  to
  mysql_connect() is optional, by the way.
 
  Also, you want to assign the result of mysql_connect() to a variable
  so you can tell the connections apart. If you only have one connection
  per script, then it's not a big deal. But, if you connect to several
  databases, then you need that result to tell them apart when you do
  queries later so PHP knows what connection to send your query through.
 
   ### mysql_select_db(mydb,$db);
   ### $sql = INSERT INTO agenda (nombre, direccion, telefono, email)
   
  +
 
  Problem is the plus (+) sign at the end of this line.
 
  ---John W. Holmes...
 
  PHP Architect - A monthly magazine for PHP Professionals. Get your
  copy today. http://www.phparch.com/
 
 
 
  --
  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

 ###
 This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For
 more information, connect to http://www.F-Secure.com/

 ###
 This message has been scanned by F-Secure Anti-Virus for Internet Mail.
 For more information, connect to http://www.F-Secure.com/

 --
 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] checking if module exists

2003-02-26 Thread Jun
another please... not a good idea on production use.


Rick Emery [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Write a test script and run it on the target server. If it crashes, it's
not enabled.

 - Original Message -
 From: Jun [EMAIL PROTECTED]
 To: 
 Sent: Wednesday, February 26, 2003 7:38 AM
 Subject: [PHP] checking if module exists


 I want my script to compress the output using gzip library. But before
that,
 I want to check if gzip library is enabled before calling the compression
 functions... How do I do that?


 jun



 --
 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] to Bryan Lipscy Re: [PHP] how___??

2003-02-26 Thread Steve Jackson
 $link = mysql_connect(remote host, mysql_user, mysql_password) 
 or die(Could not connect:  . mysql_error());

 how is that ???
 do i have to put the same function ?

 or is diferent?

Basically what they are saying is 
$link is your connection to your database.
Remote_host mysql_user and mysql_password are your login variables
(which you should have defined in your db connection function somewhere
else - preferably where noone can see it) or die means if it don't work
for some reason print out the mysql_error. Mysql_error is a built in
function of php and is useful to display problems...

Here is a typical function I use to connect to a DB.
function db_connect()
{
   $LocalHost = localhost;
   $User = root;
   $Password = password;
   $DBName = database_name;
   $result = @mysql_connect($LocalHost, $User, $Password)or
die(Could not connect to the database); 
   if (!$result)
  return false;
   if ([EMAIL PROTECTED]($DBName))
  return false;

   return $result;
}

Obviously change the variables $localhost (with your servername) $user
(your username) password (you guessed it your password) and $DBName with
the name of your database.

Then when you want to connect to the DB in php you just call 
db_connect();

The guys are right though for this level of questions you should read
the manual all of this is explained in greater detail than we can go
into.

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





 -Original Message-
 From: Luis A [mailto:[EMAIL PROTECTED] 
 Sent: 26. helmikuuta 2003 1:52
 To: [EMAIL PROTECTED]
 Subject: [PHP] to Bryan Lipscy Re: [PHP] how___??
 
 
 MEN I DONT HAVE INTERNET ACCESS
 
 thanks anyway
 
 if some one else can help m e please
 - Original Message -
 From: Bryan Lipscy [EMAIL PROTECTED]
 To: 'Luis A' [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 6:16 PM
 Subject: RE: [PHP] how___??
 
 
  Please read the online documentation at http://www.php.net
 
  Also read through examples at 
  http://www.zend.com/tips/tips.php?CID=113
 
  And before you ask another question please read: 
  http://www.catb.org/~esr/faqs/smart-questions.html
 
  Each of these pages may be translated at http://babel.altavista.com
 
  Bryan
 
 
  -Original Message-
  From: Luis A [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 2:16 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] how___??
 
 
  i need to do this
 
 
  $link = mysql_connect(remote host, mysql_user, 
 mysql_password) 
  or die(Could not connect:  . mysql_error());
 
  how is that ???
  do i have to put the same function ?
 
  or is diferent?
 
  - Original Message -
  From: Bryan Lipscy [EMAIL PROTECTED]
  To: 'Luis A' [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Sent: Tuesday, February 25, 2003 4:57 PM
  Subject: RE: [PHP] how___??
 
 
   RTM first please: 
   http://www.php.net/manual/en/function.mysql-connect.php
  
   $link = mysql_connect(localhost, mysql_user, 
 mysql_password) 
   or die(Could not connect:  . mysql_error());
  
   Replace localhost with the hostname of your mysql server.
  
  
  
   -Original Message-
   From: Luis A [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 25, 2003 1:34 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] how___??
  
  
   hlelooww)
  
   i need some one can help me please?
  
   i need to make this quine of conection
  
   for example
  
   i want to connect to a remote mysql  server
  
   i realy apreciate if some one can help me
  
   please?
  
   )
  
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



Re: [PHP] Running system commands

2003-02-26 Thread Chris Hewitt
[EMAIL PROTECTED] wrote:

I was thinking the exact same thing but I can actually delete files from
these directories using a system command through php. Would that be a
different type of permission?
Ed

On Tue, 25 Feb 2003, Chris Hewitt wrote:

[EMAIL PROTECTED] wrote:

Before I ask, I have read the documentation but nothing seems to work.

I want to run a system command from behind the scenes (totally secure
area of my server) that creates a directory and changes permissions on it.
i.e. system (mkdir $path);

Example above uses a value from a form passed to the script and is
assigned from $_POST['path'];
When I run it no directory is created. Ideas??

Does the user that the webserver is running as have permissions to make 
that directory?

HTH
Chris
No, it would be the same permissions.

Regards

Chris

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


[PHP] PDF generation asian languages

2003-02-26 Thread Simon Dedeyne
Hi,

Has anyone tried to generate PDF's that contain Japanese or Chinese
characters with the PHP functions?
I know you have to install the Asian language fontpack for PDF's but
even generating the simplest test page leads to the most horrible
crashes on my Windows XP system. (using PHP 4.3.0)

Any pointers, example scripts or references would be greatly
appreciated,

Simon


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



[PHP] unlink problem... please help...

2003-02-26 Thread Jøran Sørbø
Hi!

Im developing a site using php and mysql and need som help...
The site is a simple company site and it gets products, pictures etc from
the database...
Everyhing worls great except deleting product images from the database,
and unlink them from the directory...

the code i use is:
the delete function and update database...

// -- delete image -
 if (isset($delimage))
 {

$result=unlink('$dir_to_upload/$Photo');

   $result=mysql_query(
update product set
 Photo='nothing',
   miniPhoto='nothing',
   picture='0'
 where ID=$id
 ) or die (mysql_error().  : .mysql_errno());

   if ( ($result) != 1)
   print Sorry,can't delete the image ;
else
{
 print Image was deleted sucsessfully.brIf you want to upload a
new image do it now,overwise close the window;
 }

 }

//- end delete image ---

the code to use it...

?
 if ($row-picture == '1')
 echo img src='$dir_to_upload/$row-Photo'
br
form action=one_product.php name='imagedelete' method='post'
input type=hidden name=delimage
input type=hidden name='Photo' value='?=$row-Photo?'
input type=hidden name='miniPhoto' value='?=$row-miniPhoto?'
input type=hidden name='picrue' value='?$row-picture?'
input type=hidden name=id value='?=$row-ID?'
table align=center width=200
tr
td align=center
br
/td
/tr
   trtd align=centerinput type=submit name=submit value='Delete image'
onclick=javascript:return del()/td/tr
/table/form;

else echo Det er ikke laggt ut no bilde til dette produktet.br
a href='upload2.php?lastid=$row-ID'Klikk her for å legge til bilde/a
;
?

but when i execute this, i get the following error...

Warning: unlink() failed (No such file or directory) in one_product.php on
line 178
You have an error in your SQL syntax near '= ' at line 6 : 1064

can anyone please help me with this??
I would also like som help regarding unlinking multiple images...
So that it deletes both the original photo and the thumbnail...

Best regards,
Jøran Sørbø :: Norway



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



Re: [PHP] simple problem about authentication

2003-02-26 Thread Oliver Witt
Ernest E Vogelsinger schrieb:

 At 14:22 26.02.2003, Oliver Witt spoke out and said:
 [snip]
 if(isset($user)  isset($pw)){
 $user = ucwords(strtolower($user));
 $PHP_AUTH_USER = $user;
 $PHP_AUTH_PW = $pw;}
 
 [more...]
 And this works fine for just this page. Whenever I click on a link to a page
 which includes the same file though, it echoes 'unauthorized'...
 [snip]

 Sounds like you're using sessions... perhaps register_globals is off in
 your environment, so session variables are not registered? How do you set
 the $user and $pw variables?


no, im not using sessions and register globals is on.
the variables user and pw are set by submitting a form (method=post). that's
where i expect the mistake to be. because as far as i know, the browser usually
saves the credentials, at least the user name after authenticating. but it just
doesn't seem to do so
Olli



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



Re: [PHP] unlink problem... please help...

2003-02-26 Thread Ernest E Vogelsinger
At 16:03 26.02.2003, Jøran Sørbø spoke out and said:
[snip]
 if (isset($delimage))
 {

$result=unlink('$dir_to_upload/$Photo');

   $result=mysql_query(
update product set
 Photo='nothing',
   miniPhoto='nothing',
   picture='0'
 where ID=$id
 ) or die (mysql_error().  : .mysql_errno());

   if ( ($result) != 1)
   print Sorry,can't delete the image ;
else
{
 print Image was deleted sucsessfully.brIf you want to upload a
new image do it now,overwise close the window;
 }

 }

but when i execute this, i get the following error...

Warning: unlink() failed (No such file or directory) in one_product.php on
line 178
You have an error in your SQL syntax near '= ' at line 6 : 1064
[snip] 

1) You do not define $dir_to_upload, nor $Photo (at least in your example)
- this would lead to
$result=unlink('/');
hence error 1.

2) You don't define the variable $id (at least in your example), so the SQL
statement would read
update product set  .
Photo='nothing', miniPhoto='nothing', picture='0'  .
where ID=
hence error 2 (after ID=).

If these values are available on a global level, you must declare them
global within your function.


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


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



[PHP] Re: resizing .jpg file in php

2003-02-26 Thread Steve Magruder
Anthony Ritter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'd like to use (with permission) .jpg files from a webcam from another
URL.

 Once that URL is opened and read via PHP as a file into my site is it
 possible to resize that image?   It measures 640 x 480 pixels and I would
 like to reduce the image size by 25%.

To reduce its display size in an img tag, specify 640 * .75 for the width
(assuming 640 is for width) and 480 * .75 for the height.  If you actually
want to reduce the size of the image, then look at PHP's image-related
functions (and the GD library).

Steve



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



[PHP] WebTV vs PHP

2003-02-26 Thread Martin Mandl
Has anybody expirienced troubles with clients using some sort of WebTV?
I got a bug report saying - sbdy using WebTV has problems with our 
sites. We are using pure PHP - no JAVA, no JAVAScript ... Thus it's 
puzzling. The only thing I are sessions. However they are working also 
with cookies switched off 

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


Re: [PHP] unlink problem... please help...

2003-02-26 Thread Jøran Sørbø
Hi!
Ive tried to change the script sometimes now and it still dont work...
i still get the error Warning: unlink() failed (No such file or directory)
and it wont remove the data form the database

$dir_to_upload is defined in config.php wich is included...
it works just fine to display image using  echo img
src='$dir_to_upload/$row-Photo'
$Photo is defined in the following tag in the form input type=hidden
name='Photo' value='?=$row-Photo?'


the variable $id is defined in the following tag in the form input
type=hidden name='id' value='?=$row-ID?'

the code i use is:
the delete function and update database...

// -- delete image -
 if (isset($delimage))
 {

$result=unlink('$dir_to_upload/$row-Photo');

   $result=mysql_query(
update product set
 Photo='nothing',
   miniPhoto='nothing',
   picture='0'
 where ID='$id'
 ) or die (mysql_error().  : .mysql_errno());

   if ( ($result) != 1)
   print Sorry,can't delete the image ;
else
{
 print Image was deleted sucsessfully.brIf you want to upload a
new image do it now,overwise close the window;
 }

 }

//- end delete image ---

the code to use it...

?
 if ($row-picture == '1')
 echo img src='$dir_to_upload/$row-Photo'
br
form action=one_product.php name='imagedelete' method='post'
input type=hidden name=delimage
input type=hidden name='Photo' value='?=$row-Photo?'
input type=hidden name='miniPhoto' value='?=$row-miniPhoto?'
input type=hidden name='picrue' value='?$row-picture?'
input type=hidden name=id value='?=$row-ID?'
table align=center width=200
tr
td align=center
br
/td
/tr
   trtd align=centerinput type=submit name=submit value='Delete image'
onclick=javascript:return del()/td/tr
/table/form;

else echo Det er ikke laggt ut no bilde til dette produktet.br
a href='upload2.php?lastid=$row-ID'Klikk her for å legge til bilde/a
;
?

but when i execute this, i get the following error...

Warning: unlink() failed (No such file or directory) in one_product.php on
line 178
You have an error in your SQL syntax near '= ' at line 6 : 1064

can anyone please help me with this??
I would also like som help regarding unlinking multiple images...
So that it deletes both the original photo and the thumbnail...

Best regards,
Jøran Sørbø :: Norway


Ernest E Vogelsinger [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
At 16:03 26.02.2003, Jøran Sørbø spoke out and said:
[snip]
 if (isset($delimage))
 {

$result=unlink('$dir_to_upload/$Photo');

   $result=mysql_query(
update product set
 Photo='nothing',
   miniPhoto='nothing',
   picture='0'
 where ID=$id
 ) or die (mysql_error().  : .mysql_errno());

   if ( ($result) != 1)
   print Sorry,can't delete the image ;
else
{
 print Image was deleted sucsessfully.brIf you want to upload a
new image do it now,overwise close the window;
 }

 }

but when i execute this, i get the following error...

Warning: unlink() failed (No such file or directory) in one_product.php on
line 178
You have an error in your SQL syntax near '= ' at line 6 : 1064
[snip]

1) You do not define $dir_to_upload, nor $Photo (at least in your example)
- this would lead to
$result=unlink('/');
hence error 1.

2) You don't define the variable $id (at least in your example), so the SQL
statement would read
update product set  .
Photo='nothing', miniPhoto='nothing', picture='0'  .
where ID=
hence error 2 (after ID=).

If these values are available on a global level, you must declare them
global within your function.


--
   O Ernest E. Vogelsinger
   (\) ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] unlink problem... please help...

2003-02-26 Thread Ernest E Vogelsinger
At 16:42 26.02.2003, Jøran Sørbø spoke out and said:
[snip]
Hi!
Ive tried to change the script sometimes now and it still dont work...
i still get the error Warning: unlink() failed (No such file or directory)
and it wont remove the data form the database

$dir_to_upload is defined in config.php wich is included...
it works just fine to display image using  echo img
src='$dir_to_upload/$row-Photo'
$Photo is defined in the following tag in the form input type=hidden
name='Photo' value='?=$row-Photo?'


the variable $id is defined in the following tag in the form input
type=hidden name='id' value='?=$row-ID?'
[snip] 

There are also errors in how you format the filename passed to unlink(),
and in formatting the SQL statement - see below.
Do yourself a favour and make the following modification to your script and
look at the output:

if (isset($delimage))
{
   $file = $dir_to_upload/{$row-Photo};
$sql = update product set Photo='nothing', miniPhoto='nothing',  .
   picture='0' where ID='$id';

echo unlink($file);br /query($sql);br /;

$result=unlink($file);
   $result=mysql_query($sql) or die 


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


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



Re: [PHP] unlink problem... please help...

2003-02-26 Thread Chris Hayes
At 16:42 26-2-03, you wrote:
$result=unlink('$dir_to_upload/$row-Photo');
what do you get when you echo

echo htmlspecialchars('$dir_to_upload/$row-Photo');

and do you use the full file path? Images accept relative links but in my 
experience PHP's file handling functions want the full path. 

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


Re: [PHP] WebTV vs PHP

2003-02-26 Thread Ernest E Vogelsinger
At 16:49 26.02.2003, Martin Mandl spoke out and said:
[snip]
Has anybody expirienced troubles with clients using some sort of WebTV?
I got a bug report saying - sbdy using WebTV has problems with our 
sites. We are using pure PHP - no JAVA, no JAVAScript ... Thus it's 
puzzling. The only thing I are sessions. However they are working also 
with cookies switched off 
[snip] 

If the browser has cookies disabled PHP will automatically switch to
url-based session handling (provided you have url_rewrite enabled). The
rest is a html or possibly css issue.

If you need to get this sorted out you should try to work with a WebTV
client appliance to see what's actually happening...


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


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



Re: [PHP] niklasRe: [PHP] mysql trouble

2003-02-26 Thread 1LT John W. Holmes
Dude... honestly, lay off the coffee and learn to type.

---John Holmes...

- Original Message -
From: Luis A [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 9:24 AM
Subject: Re: [PHP] niklasRe: [PHP] mysql trouble


oh   IN GONNA TRY NOW

thanks

i scream againg if present truble )

- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 9:13 AM
Subject: RE: [PHP] to holmes Re: [PHP] mysql trouble


 No, he doesn't mean that.

 You are doing:
 $String = text  + more text;
 while you should be doing:
 $String = text  . more text;


 Niklas

 -Original Message-
 From: Luis A [mailto:[EMAIL PROTECTED]
 Sent: 26. helmikuuta 2003 16:09
 To: [EMAIL PROTECTED]
 Subject: [PHP] to holmes Re: [PHP] mysql trouble


 you mean  i do not need to put the pus on the end of the function

 (+)   i dont need to put there that?


 - Original Message -
 From: John W. Holmes [EMAIL PROTECTED]
 To: 'Richard Whitney' [EMAIL PROTECTED]; 'Luis A'
 [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 8:21 PM
 Subject: RE: [PHP] mysql trouble


   ### ?php
   ### // process form
   ### $link = mysql_connect(localhost, root);
   you need to have the password as the third argument
   $link = mysql_connect(localhost, root, password);
  
   Also, why is it in a variable?
   Just make it:
   mysql_connect(localhost, root, password);
 
  Sometime there are users that do not have a password. Every parameter
  to
  mysql_connect() is optional, by the way.
 
  Also, you want to assign the result of mysql_connect() to a variable
  so you can tell the connections apart. If you only have one connection
  per script, then it's not a big deal. But, if you connect to several
  databases, then you need that result to tell them apart when you do
  queries later so PHP knows what connection to send your query through.
 
   ### mysql_select_db(mydb,$db);
   ### $sql = INSERT INTO agenda (nombre, direccion, telefono, email)
   
  +
 
  Problem is the plus (+) sign at the end of this line.
 
  ---John W. Holmes...
 
  PHP Architect - A monthly magazine for PHP Professionals. Get your
  copy today. http://www.phparch.com/
 
 
 
  --
  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

 ###
 This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For
 more information, connect to http://www.F-Secure.com/

 ###
 This message has been scanned by F-Secure Anti-Virus for Internet Mail.
 For more information, connect to http://www.F-Secure.com/

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




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


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



[PHP] newbie: installing gd in php4

2003-02-26 Thread Anthony Ritter
Using MS Win 98 / PHP 4 and Apache.

I tried running the following script but got an undefined call to:

ImageCreate()

The following copy is located in my php.ini file...one of which is:

..
;extension=php_gd.dll
..

I tried uncommenting this line to no avail.

What is the best way to install php_gd.dll so that I can make use of the
image library.
Many thanks.

Tony Ritter



;;
; Dynamic Extensions ;
;;
; if you wish to have an extension loaded automaticly, use the
; following syntax:  extension=modulename.extension
; for example, on windows,
; extension=msql.dll
; or under UNIX,
; extension=msql.so
; Note that it should be the name of the module only, no directory
information
; needs to go here.  Specify the location of the extension with the
extension_dir directive above.


;Windows Extensions
;extension=php_mysql.dll
;extension=php_nsmail.dll
;extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
;extension=php_gd.dll
;extension=php_dbm.dll
;extension=php_mssql.dll
;extension=php_zlib.dll
;extension=php_filepro.dll
;extension=php_imap4r2.dll
;extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll
;extension=php_odbc.dll

--





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



[PHP] conditional question.

2003-02-26 Thread Jason Jacobs
G'day all.  I'm trying to hack some code, and I've run into a goofy problem.  

I have a conditional that looks like this:
if ((is_array($HTTP_POST_VARS['cart_quantity']))  
(is_array($HTTP_POST_VARS['products_id']))){
//do stuff
}

The evaluation returns false.  What makes this confusing is just before this block, 
for debugging purposes, I have the following:
echo $HTTP_POST_VARS['cart_quantity'];
echo $HTTP_POST_VARS['products_id'];

Both of them return the string Array, indicating to me that they are arrays.  Now, 
if they're both arrays, and the conditional is checking to see if they're both arrays, 
wouldn't it make sense that it should evaluate to true?

Thanks for your help.

-
Jason Jacobs
Factory7, LLC

Support a Constitutional Amendment to protect the Pledge of Allegiance and National 
Motto. Go to www.wepledge.com

[PHP] Re: resizing .jpg file in php

2003-02-26 Thread Anthony Ritter



--


Steve Magruder  wrote in message :
 To reduce its display size in an img tag, specify 640 * .75 for the width
 (assuming 640 is for width) and 480 * .75 for the height.  If you actually
 want to reduce the size of the image, then look at PHP's image-related
 functions (and the GD library).

 Steve
..

Thanks Steve.

Using MS Win 98 / PHP 4 and Apache.

I tried running the following script but got an undefined call to:

ImageCreate()

The following copy is located in my php.ini file...one of which is:

..
;extension=php_gd.dll
..

I tried uncommenting this line to no avail.

What is the best way to install php_gd.dll so that I can make use of the
image library.
Many thanks.

Tony Ritter



;;
; Dynamic Extensions ;
;;
; if you wish to have an extension loaded automaticly, use the
; following syntax:  extension=modulename.extension
; for example, on windows,
; extension=msql.dll
; or under UNIX,
; extension=msql.so
; Note that it should be the name of the module only, no directory
information
; needs to go here.  Specify the location of the extension with the
extension_dir directive above.


;Windows Extensions
;extension=php_mysql.dll
;extension=php_nsmail.dll
;extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
;extension=php_gd.dll
;extension=php_dbm.dll
;extension=php_mssql.dll
;extension=php_zlib.dll
;extension=php_filepro.dll
;extension=php_imap4r2.dll
;extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll
;extension=php_odbc.dll






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



[PHP] Re: resizing .jpg file in php

2003-02-26 Thread Steve Magruder
Anthony Ritter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]



 --


 Steve Magruder  wrote in message :
  To reduce its display size in an img tag, specify 640 * .75 for the
width
  (assuming 640 is for width) and 480 * .75 for the height.  If you
actually
  want to reduce the size of the image, then look at PHP's image-related
  functions (and the GD library).
 
  Steve
 ..

 Thanks Steve.

 Using MS Win 98 / PHP 4 and Apache.

 I tried running the following script but got an undefined call to:

 ImageCreate()

 The following copy is located in my php.ini file...one of which is:

 ..
 ;extension=php_gd.dll
 ..

 I tried uncommenting this line to no avail.

 What is the best way to install php_gd.dll so that I can make use of the
 image library.
 Many thanks.

Wish I could help here, but I frankly don't have GD expertise (yet).

Steve



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



Re: [PHP] conditional question.

2003-02-26 Thread Chris Hayes
At 17:10 26-2-03, you wrote:
I have a conditional that looks like this:
if ((is_array($HTTP_POST_VARS['cart_quantity']))  
(is_array($HTTP_POST_VARS['products_id']))){
//do stuff
}

The evaluation returns false.  What makes this confusing is just before 
this block, for debugging purposes, I have the following:
echo $HTTP_POST_VARS['cart_quantity'];
echo $HTTP_POST_VARS['products_id'];

Both of them return the string Array, indicating to me that they are 
arrays.  Now, if they're both arrays, and the conditional is checking to 
see if they're both arrays, wouldn't it make sense that it should evaluate 
to true?
My first reflex was to check the user-annotated manual and the last note 
seems to fit just fine to your problem:


syncro at outgun dot com
30-Jan-2003 10:16
I have noticed that is_array() acts a bit weird when the argument is an 
expression, rather than a variable. Working with a multilevel nested array, 
is_array($bigArray[$part]) does not return what it should, but 
$column=$bigArray[$part]; and then is_array($column) does the job fine...
It looks like this might happen with other is_* functions as well.

(from http://nl.php.net/manual/nl/function.is-array.php)

I suggest to also try $column=$bigArray[$part]; --- note the added , so 
the (sub)array does not need to be copied.



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


RE: [PHP] newbie: installing gd in php4

2003-02-26 Thread Cal Evans
did you bounce the service after uncommenting the line?

=C=

* Cal Evans
* Stay Plugged Into Your Audience
* http://www.christianperformer.com

-Original Message-
From: Anthony Ritter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 10:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] newbie: installing gd in php4


Using MS Win 98 / PHP 4 and Apache.

I tried running the following script but got an undefined call to:

ImageCreate()

The following copy is located in my php.ini file...one of which is:

..
;extension=php_gd.dll
..

I tried uncommenting this line to no avail.

What is the best way to install php_gd.dll so that I can make use of the
image library.
Many thanks.

Tony Ritter



;;
; Dynamic Extensions ;
;;
; if you wish to have an extension loaded automaticly, use the
; following syntax:  extension=modulename.extension
; for example, on windows,
; extension=msql.dll
; or under UNIX,
; extension=msql.so
; Note that it should be the name of the module only, no directory
information
; needs to go here.  Specify the location of the extension with the
extension_dir directive above.


;Windows Extensions
;extension=php_mysql.dll
;extension=php_nsmail.dll
;extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
;extension=php_gd.dll
;extension=php_dbm.dll
;extension=php_mssql.dll
;extension=php_zlib.dll
;extension=php_filepro.dll
;extension=php_imap4r2.dll
;extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll
;extension=php_odbc.dll

--





-- 
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] to Bryan Lipscy Re: [PHP] mysql trouble

2003-02-26 Thread Luis A
the mysql server guives  to me this error now

tk a look


¡Gracias! Hemos recibido sus datos.
Warning: mysql_free_result(): supplied argument is not a valid MySQL result
resource in c:\apache group\apache\htdocs\1\2\registered.php3 on line 39

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource
in c:\apache group\apache\htdocs\1\2\registered.php3 on line 42

the error is on here

line 39 mysql_free_result($result);

line 42 mysql_close($db);




- Original Message -
From: Bryan Lipscy [EMAIL PROTECTED]
To: 'Luis A' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 8:25 PM
Subject: RE: [PHP] mysql trouble


 Create a user with appropriate privledges for the database.  DO NOT use
 root.


 ?php

 $DB_HOST = localhost;
 $DB_USER = root;  // Do not do this.  Make a different user.
 $DB_PASS = ;
 $DB_DB = mydb;

 // connect to the database server
 $db= @mysql_pconnect ( $DB_HOST , $DB_USER , $DB_PASS );

 // use the database
 @mysql_select_db ( $DB_DB )  or die ( [ERROR] .mysql_error()
 );

 // process form

 $sql = INSERT INTO agenda (nombre, direccion, telefono, email)
 VALUES ('.$nombre.', '.$direccion.', '.$telefono.',
 '.$email.');

 $result = mysql_query($sql);

 echo ¡Gracias! Hemos recibido sus datos.\n;

 /* Free resultset */
 mysql_free_result($result);

 /* Closing connection */
 mysql_close($db);

 ?


 You did not mention where the $nombre, $direccion, $telefono, or $email
 variables are being initialized.
 To capture the values from a form use $_POST['name'] where name is the
 name of the field on the form.

 HTH

 -Original Message-
 From: Luis A [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 4:21 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] to paulm Re: [PHP] mysql trouble


 hey i think the root does not need password to connect to mysql

 or yes 

 on my server the root user does not have password
 thats why i dont know why he does not update the database?

 - Original Message -
 From: paulm [EMAIL PROTECTED]
 To: Luis A [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 6:48 PM
 Subject: Re: [PHP] mysql trouble


  you don't have a password for root in mysql_connect
  - Original Message -
  From: Luis A [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, February 26, 2003 1:04 AM
  Subject: [PHP] mysql trouble
 
 
  hi pasl i got a troblem here
 
 
  if some one can help me ?
 
  take a look at this
  ?php
  // process form
  $link = mysql_connect(localhost, root);
  mysql_select_db(mydb,$db); $sql = INSERT INTO agenda (nombre,
  direccion, telefono, email)  +
VALUES ('$nombre', '$direccion', '$telefono', '$email'); $result =

  mysql_query($sql); echo ¡Gracias! Hemos recibido sus datos.\n;
 
  ?
 
 
 
  HE DOES NOT WORKING
 
  any subjest ?
 
 



 --
 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] newbie: installing gd in php4

2003-02-26 Thread Martin Mandl
just make sure, the php_gd.dll is in the directory where all your other 
php-dlls are ...

-Original Message-
Using MS Win 98 / PHP 4 and Apache.
What is the best way to install php_gd.dll so that I can make use of the
image library.


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


Re: [PHP] newbie: installing gd in php4

2003-02-26 Thread Anthony Ritter
In my php.ini file, this is what it looks like:

...
extension_dir = C:\php4\extensions\; directory in which the loadable
extensions (modules) reside

extension=php_gd.dll


Many thanks,
TR





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



Re: [PHP] header and writing problem

2003-02-26 Thread Chris Shiflett
--- George Pitcher [EMAIL PROTECTED] wrote:
 Writing to a file id not permitted before creating the header for the
 redirect.
 
 can anyone suggest a workaround.

Have you tried it? I'm not sure who told you this, but they are wrong.

Chris

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



Re: [PHP] newbie: installing gd in php4

2003-02-26 Thread Siddharth Hegde
I think you have installed GD properly. This is actually due to bad 
documentation. The function is actually

imagecreate() not ImageCreate() C the difference?

Let me know if this helps

- Original Message -
From: Anthony Ritter [EMAIL PROTECTED]
Date: Wednesday, February 26, 2003 9:45 pm
Subject: [PHP] newbie: installing gd in php4

 Using MS Win 98 / PHP 4 and Apache.
 
 I tried running the following script but got an undefined call to:
 
 ImageCreate()
 
 The following copy is located in my php.ini file...one of which is:
 
 ..
 ;extension=php_gd.dll
 ..
 
 I tried uncommenting this line to no avail.
 
 What is the best way to install php_gd.dll so that I can make use 
 of the
 image library.
 Many thanks.
 
 Tony Ritter
 
 
 
 ;;
 ; Dynamic Extensions ;
 ;;
 ; if you wish to have an extension loaded automaticly, use the
 ; following syntax:  extension=modulename.extension
 ; for example, on windows,
 ; extension=msql.dll
 ; or under UNIX,
 ; extension=msql.so
 ; Note that it should be the name of the module only, no directory
 information
 ; needs to go here.  Specify the location of the extension with the
 extension_dir directive above.
 
 
 ;Windows Extensions
 ;extension=php_mysql.dll
 ;extension=php_nsmail.dll
 ;extension=php_calendar.dll
 ;extension=php_dbase.dll
 ;extension=php_filepro.dll
 ;extension=php_gd.dll
 ;extension=php_dbm.dll
 ;extension=php_mssql.dll
 ;extension=php_zlib.dll
 ;extension=php_filepro.dll
 ;extension=php_imap4r2.dll
 ;extension=php_ldap.dll
 ;extension=php_crypt.dll
 ;extension=php_msql2.dll
 ;extension=php_odbc.dll
 
 --
 
 
 
 
 
 -- 
 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] Directory Permissions?

2003-02-26 Thread Jay Paulson
I was running fileperms() function to find out what a directory is chmod'ed
to.  However, this doesn't return anything because it has to check a file.
My question is there a function that will return what a directory is
chmod'ed to?

Thanks!
Jay


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



[PHP] question on text file reading.

2003-02-26 Thread David Banning
The company I am working with is using an old database, which 
doesn't even support memo field beyond 256 characters, so it is probably
too difficult, and not worth trying to interface the database with php.

I was wondering how easy it would be to have php access the database
via SQL. The data we are looking for is accessible via SQL. I know that
with my database,
that php -could- execute a shell command which would get the data 
needed via SQL. 

The data returned would simply spool to the screen, or to a file.
How difficult would it be for php to read and sort the data that
was available that way? The data is just fields separated by pipes.

I imagine that it might be possible for php to read the delimited
text file, but what about php reading back the text file directly
from the command that is executed? This would be similar to php having
to execute the command;

$ cat datafile.txt

and read the results. In my case, the command would be more something 
like;

$ SQL sqlrequestfile 

where I have my sql commands in sqlrequestfile. 

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



[PHP] Splitting up big strings

2003-02-26 Thread {R}ichard Ashton

I have the body ov a Usnet article, all of it, in $body. I want to
split it into lines.

I have tried 

$lines = explode( X, $body);

where I have used

X = 0x0A
X = '0x0A'
X = 0x0D
X = '0x0A'
X = \r 


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



[PHP] Version control, Bug Reporting, Forum, Mailing List

2003-02-26 Thread Christopher Hilling
Hi - I am trying to find an application which has the following creditials

Version control - including extensions
Bug reporting - including email submission
Forum - for multiple projects
Mailing list - for multiple projects
Language - php
Database - mySQL
OS - windows and apachie
UI - skinable

Version contol is for internal developers but would like to final release
version available to the public.

Can anyone point me in the right direction to finding an application which
does all - or at least most of the above

Thanks

Chris



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



Re: [PHP] question on text file reading.

2003-02-26 Thread Chris Shiflett
--- David Banning [EMAIL PROTECTED] wrote:
 The company I am working with is using an old database, which 
 doesn't even support memo field beyond 256 characters, so it is probably
 too difficult, and not worth trying to interface the database with php.
 
 I was wondering how easy it would be to have php access the database
 via SQL. The data we are looking for is accessible via SQL.

I think you are confused about what SQL is.

What you need to access a database is some sort of library (driver) that
translates your SQL statements into something specific to the database you are
interacting with.

For performance, you always want to try to use a native driver, but in your
case, you might be restricted to something like ODBC. SQL is just a query
language.

Chris

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



Re: [PHP] Splitting up big strings

2003-02-26 Thread Jason Wong
On Thursday 27 February 2003 00:54, {R}ichard Ashton wrote:
 I have the body ov a Usnet article, all of it, in $body. I want to
 split it into lines.

 I have tried

 $lines = explode( X, $body);

 where I have used

 X = 0x0A
 X = '0x0A'
 X = 0x0D
 X = '0x0A'
 X = \r

Try \n.

-- 
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
--
/*
Ignorance must certainly be bliss or there wouldn't be so many people
so resolutely pursuing it. 
*/


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



Re: [PHP] Directory Permissions?

2003-02-26 Thread Chris Shiflett
--- Jay Paulson [EMAIL PROTECTED] wrote:
 I was running fileperms() function to find out what a directory is
 chmod'ed to.

Just so you know, chmod is change mode. I understand what you mean, though;
you are wanting to know the permissions of a directory.

 However, this doesn't return anything because it has to check a file.

Are you sure that is why? Be sure before you start telling us what is wrong. I
disagree with your assumption here.

 My question is there a function that will return what a directory is
 chmod'ed to?

The one you tried works just fine:

http://www.php.net/manual/en/function.fileperms.php

Chris

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



[PHP] to Bryan Lipscy Re: [PHP] mysql trouble

2003-02-26 Thread Luis A
i dont know whyyy  he does not inser into the databse the values ??


take a look

?php

$DB_HOST = localhost;
$DB_USER = db;  // Do not do this.  Make a different user.
$DB_PASS = luisito;
$DB_DB = mydb;

// connect to the database server
$db= @mysql_pconnect ( $DB_HOST , $DB_USER , $DB_PASS );

// use the database
@mysql_select_db ( $DB_DB )  or die ( [ERROR] .mysql_error()
);

// process form

$sql = INSERT INTO opina (nombre, provincia, pais, url, title, email,
comentario)
VALUES ('.$nombre.', '.$provincia.', '.$pais.', '.$url.',
'.$title.', '.$email.', '.$comentario.');

$result = mysql_query($sql);

echo ¡Gracias! Hemos recibido sus datos.\n;


?

aparently hje works all rigth

but when i present this var


?php
$link = mysql_connect(localhost, nobody);
mysql_select_db(mydb, $link);
$result = mysql_query(SELECT * FROM opina, $link);
echo Nombre: .mysql_result($result, 0, nombre).br;
echo Pais: .mysql_result($result, 0, pais).br;
echo Provincia: .mysql_result($result, 0, provincia).br;
echo URL :.mysql_result($result, 0, url).br;
echo Titulo de La Web: .mysql_result($result, 0, title).br;
echo E-mail :.mysql_result($result, 0, email).br;
echo Comentario :.mysql_result($result, 0, comentario).br;
?

on the navigator he present onley that
empty with no results of the database
look

Nombre:
Pais:
Provincia:
URL :
Titulo de La Web:
E-mail :
Comentario :




i dont know



any subjest ???

please help me im newbabe

)



- Original Message -
From: Bryan Lipscy [EMAIL PROTECTED]
To: 'Luis A' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 8:25 PM
Subject: RE: [PHP] mysql trouble


 Create a user with appropriate privledges for the database.  DO NOT use
 root.


 ?php

 $DB_HOST = localhost;
 $DB_USER = root;  // Do not do this.  Make a different user.
 $DB_PASS = ;
 $DB_DB = mydb;

 // connect to the database server
 $db= @mysql_pconnect ( $DB_HOST , $DB_USER , $DB_PASS );

 // use the database
 @mysql_select_db ( $DB_DB )  or die ( [ERROR] .mysql_error()
 );

 // process form

 $sql = INSERT INTO agenda (nombre, direccion, telefono, email)
 VALUES ('.$nombre.', '.$direccion.', '.$telefono.',
 '.$email.');

 $result = mysql_query($sql);

 echo ¡Gracias! Hemos recibido sus datos.\n;

 /* Free resultset */
 mysql_free_result($result);

 /* Closing connection */
 mysql_close($db);

 ?


 You did not mention where the $nombre, $direccion, $telefono, or $email
 variables are being initialized.
 To capture the values from a form use $_POST['name'] where name is the
 name of the field on the form.

 HTH

 -Original Message-
 From: Luis A [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 4:21 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] to paulm Re: [PHP] mysql trouble


 hey i think the root does not need password to connect to mysql

 or yes 

 on my server the root user does not have password
 thats why i dont know why he does not update the database?

 - Original Message -
 From: paulm [EMAIL PROTECTED]
 To: Luis A [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 6:48 PM
 Subject: Re: [PHP] mysql trouble


  you don't have a password for root in mysql_connect
  - Original Message -
  From: Luis A [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, February 26, 2003 1:04 AM
  Subject: [PHP] mysql trouble
 
 
  hi pasl i got a troblem here
 
 
  if some one can help me ?
 
  take a look at this
  ?php
  // process form
  $link = mysql_connect(localhost, root);
  mysql_select_db(mydb,$db); $sql = INSERT INTO agenda (nombre,
  direccion, telefono, email)  +
VALUES ('$nombre', '$direccion', '$telefono', '$email'); $result =

  mysql_query($sql); echo ¡Gracias! Hemos recibido sus datos.\n;
 
  ?
 
 
 
  HE DOES NOT WORKING
 
  any subjest ?
 
 



 --
 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] Version control, Bug Reporting, Forum, Mailing List

2003-02-26 Thread Chris Shiflett
--- Christopher Hilling [EMAIL PROTECTED] wrote:
 Hi - I am trying to find an application which has the following creditials
 
 Version control - including extensions
 Bug reporting - including email submission
 Forum - for multiple projects
 Mailing list - for multiple projects
 Language - php
 Database - mySQL
 OS - windows and apachie
 UI - skinable

http://gforge.org/

Chris

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



Re: [PHP] to Bryan Lipscy Re: [PHP] mysql trouble

2003-02-26 Thread Jason Wong
On Thursday 27 February 2003 01:00, Luis A wrote:

 ?php
 $link = mysql_connect(localhost, nobody);
 mysql_select_db(mydb, $link);
 $result = mysql_query(SELECT * FROM opina, $link);
 echo Nombre: .mysql_result($result, 0, nombre).br;

[snip]

You need to use the mysql_fetch_*() functions as well. See manual for details. 

Aren't you the guy who doesn't have internet access? [sic]. If so let me know 
and I'll email the manual to you, state whether you want:

a) English or Spanish (I see you're using a Cuba domain)
b) Single HTML or Multiple HTML or Windows HTML (CHM format)


-- 
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
--
/*
His great aim was to escape from civilization, and, as soon as he had
money, he went to Southern California.
*/


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



Re: [PHP] Version control, Bug Reporting, Forum, Mailing List

2003-02-26 Thread Adam Voigt




According to that website, it requires Postgres, not MySQL.



On Wed, 2003-02-26 at 12:06, Chris Shiflett wrote:

--- Christopher Hilling [EMAIL PROTECTED] wrote:

 Hi - I am trying to find an application which has the following creditials

 

 Version control - including extensions

 Bug reporting - including email submission

 Forum - for multiple projects

 Mailing list - for multiple projects

 Language - php

 Database - mySQL

 OS - windows and apachie

 UI - skinable



http://gforge.org/



Chris



-- 

PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP] Too many connections - MySQL

2003-02-26 Thread Stephen Craton
On this site, www.roempire.com, which we host, they are having problems with too many 
connections. I think that someone messed with the GRANT option. How can we reverse 
this and allow unlimited connections per site? Or is this a problem with the script?

Thanks,
Stephen Craton
http://www.melchior.us



Re: [PHP] niklasRe: [PHP] mysql trouble

2003-02-26 Thread Jason Wong
On Thursday 27 February 2003 00:08, 1LT John W. Holmes wrote:
 Dude... honestly, lay off the coffee and learn to type.

Shouldn't that be cigars?

-- 
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
--
/*
Don't worry about avoiding temptation -- as you grow older, it starts
avoiding you.
-- The Old Farmer's Almanac
*/


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



[PHP] Re: Too many connections - MySQL

2003-02-26 Thread Martin Mandl
don't use persitent connections ... that will solve your problem

Stephen Craton wrote:

On this site, www.roempire.com, which we host, they are having problems with too many connections. I think that someone messed with the GRANT option. How can we reverse this and allow unlimited connections per site? Or is this a problem with the script?

Thanks,
Stephen Craton
http://www.melchior.us


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


[PHP] Deleting a page after viewing it

2003-02-26 Thread Paul
I have a confirmation of membership page a user would arrive at after 
clicking on a URL in an email. After they click on a link in this page I 
want to delete the page itself so it will only exist for this one use. 
The URL in the page does go to another Welcome page which is on 
another server. Do I need to include something in the second page that 
will do the deleting, or can I delete it from within the script for the 
first page that deletes as of the click on the URL. Haven't written any 
code yet for this, but I'm thinking unlink.

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


[PHP] imagecreate()

2003-02-26 Thread Anthony Ritter
On MS Win 98 / Apache / PHP 4

If somebody out there using Win can check my php.ini file and advise me what
I'm doing wrong.

I have uncommented:
..
extension=php_gd.dll
..
and have included:
..
extension_dir = C:\php4\extensions

I run the php script:

?
header(Content-type:image/png);
$image=imagecreate(200,200);
imagepng($image);
?


I receive:

X-Powered-By: PHP/4.0.0 Content-type:image/png
Fatal error: Call to undefined function: imagecreate() in c:\program
files\apache group\apache\htdocs\image.php on line 3

Thank you.
TR
...

// this is in my php.ini file:

;
; Paths and Directories ;
;
include_path =   ; UNIX: /path1:/path2  Windows:
\path1;\path2
doc_root  = ; the root of the php pages, used only if nonempty
user_dir  = ; the directory under which php opens the script using
/~username, used only if nonempty
;upload_tmp_dir = ; temporary directory for HTTP uploaded
files (will use system default if not specified)
upload_max_filesize = 2097152   ; 2 Meg default limit on file uploads
extension_dir = C:\php4\extensions; directory in which the loadable
extensions (modules) reside


;;
; Dynamic Extensions ;
;;
; if you wish to have an extension loaded automaticly, use the
; following syntax:  extension=modulename.extension
; for example, on windows,
; extension=msql.dll
; or under UNIX,
; extension=msql.so
; Note that it should be the name of the module only, no directory
information
; needs to go here.  Specify the location of the extension with the
extension_dir directive above.


;Windows Extensions
;extension=php_mysql.dll
;extension=php_nsmail.dll
;extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
extension=php_gd.dll
;extension=php_dbm.dll
;extension=php_mssql.dll
;extension=php_zlib.dll
;extension=php_filepro.dll
;extension=php_imap4r2.dll
;extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll
;extension=php_odbc.dll


//this is the php script:

?
header(Content-type:image/png);
$image=imagecreate(200,200);
imagepng($image);
?
...

//this is what I get:

X-Powered-By: PHP/4.0.0 Content-type:image/png
Fatal error: Call to undefined function: imagecreate() in c:\program
files\apache group\apache\htdocs\image.php on line 3




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



Re: [PHP] imagecreate()

2003-02-26 Thread Adam Voigt




Did you restart?



On Wed, 2003-02-26 at 12:41, Anthony Ritter wrote:

On MS Win 98 / Apache / PHP 4



If somebody out there using Win can check my php.ini file and advise me what

I'm doing wrong.



I have uncommented:

..

extension=php_gd.dll

..

and have included:

..

extension_dir = C:\php4\extensions



I run the php script:



?

header(Content-type:image/png);

$image=imagecreate(200,200);

imagepng($image);

?





I receive:



X-Powered-By: PHP/4.0.0 Content-type:image/png

Fatal error: Call to undefined function: imagecreate() in c:\program

files\apache group\apache\htdocs\image.php on line 3



Thank you.

TR

...



// this is in my php.ini file:



;

; Paths and Directories ;

;

include_path =   ; UNIX: /path1:/path2  Windows:

\path1;\path2

doc_root  = ; the root of the php pages, used only if nonempty

user_dir  = ; the directory under which php opens the script using

/~username, used only if nonempty

;upload_tmp_dir = ; temporary directory for HTTP uploaded

files (will use system default if not specified)

upload_max_filesize = 2097152   ; 2 Meg default limit on file uploads

extension_dir = C:\php4\extensions; directory in which the loadable

extensions (modules) reside





;;

; Dynamic Extensions ;

;;

; if you wish to have an extension loaded automaticly, use the

; following syntax:  extension=modulename.extension

; for example, on windows,

; extension=msql.dll

; or under UNIX,

; extension=msql.so

; Note that it should be the name of the module only, no directory

information

; needs to go here.  Specify the location of the extension with the

extension_dir directive above.





;Windows Extensions

;extension=php_mysql.dll

;extension=php_nsmail.dll

;extension=php_calendar.dll

;extension=php_dbase.dll

;extension=php_filepro.dll

extension=php_gd.dll

;extension=php_dbm.dll

;extension=php_mssql.dll

;extension=php_zlib.dll

;extension=php_filepro.dll

;extension=php_imap4r2.dll

;extension=php_ldap.dll

;extension=php_crypt.dll

;extension=php_msql2.dll

;extension=php_odbc.dll





//this is the php script:



?

header(Content-type:image/png);

$image=imagecreate(200,200);

imagepng($image);

?

...



//this is what I get:



X-Powered-By: PHP/4.0.0 Content-type:image/png

Fatal error: Call to undefined function: imagecreate() in c:\program

files\apache group\apache\htdocs\image.php on line 3









-- 

PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP] to Jason Wong Re: [PHP] mysql trouble

2003-02-26 Thread Luis A
OK IF no trouble for ud to send it to me the manual ??

in spanish
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 12:17 PM
Subject: Re: [PHP] to Bryan Lipscy Re: [PHP] mysql trouble


 On Thursday 27 February 2003 01:00, Luis A wrote:

  ?php
  $link = mysql_connect(localhost, nobody);
  mysql_select_db(mydb, $link);
  $result = mysql_query(SELECT * FROM opina, $link);
  echo Nombre: .mysql_result($result, 0, nombre).br;

 [snip]

 You need to use the mysql_fetch_*() functions as well. See manual for
details.

 Aren't you the guy who doesn't have internet access? [sic]. If so let me
know
 and I'll email the manual to you, state whether you want:

 a) English or Spanish (I see you're using a Cuba domain)
 b) Single HTML or Multiple HTML or Windows HTML (CHM format)


 --
 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
 --
 /*
 His great aim was to escape from civilization, and, as soon as he had
 money, he went to Southern California.
 */


 --
 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] Deleting a page after viewing it

2003-02-26 Thread Jason Wong
On Thursday 27 February 2003 01:32, Paul wrote:
 I have a confirmation of membership page a user would arrive at after
 clicking on a URL in an email. After they click on a link in this page I
 want to delete the page itself so it will only exist for this one use.
 The URL in the page does go to another Welcome page which is on
 another server. Do I need to include something in the second page that
 will do the deleting, or can I delete it from within the script for the
 first page that deletes as of the click on the URL. Haven't written any
 code yet for this, but I'm thinking unlink.

Seems like a cumbersome way of doing things. Presumably you would have stored 
membership details in a database? When someone signs up, store a unique value 
token in your membership table. Then people would access your 
membership-confirmation page using something like:

 http://www.example.com/membership.php?token=something

Then delete token from your db and redirect to welcome page.

-- 
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
--
/*
To err is human, to moo bovine.
*/


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



Re: [PHP] to Jason Wong Re: [PHP] mysql trouble

2003-02-26 Thread Jason Wong
On Thursday 27 February 2003 01:32, Luis A wrote:
 OK IF no trouble for ud to send it to me the manual ??

 in spanish

  b) Single HTML or Multiple HTML or Windows HTML (CHM format)

Which format?

Also please do not change the subject (ie putting people's name into the 
subject).

-- 
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
--
/*
Life -- Love It or Leave It.
*/


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



[PHP] Re: [PHP-DB] SESSIONS

2003-02-26 Thread Leif K-Brooks
Not $_POST[SUBMIT].  It should be $_POST['SUBMIT'].

mike karthauser wrote:

on 26/2/03 12:58 pm, MaN at [EMAIL PROTECTED] wrote:

 

And also use $_POST[SUBMIT] or set register_globals On
   

Just use $_POST[SUBMIT]

register_globals was turned off for security reasons. You are compromising
the security of your system if you turn it back on.
 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.



Re: [PHP] Deleting a page after viewing it

2003-02-26 Thread Chris Hayes
At 18:32 26-2-03, you wrote:
I have a confirmation of membership page a user would arrive at after 
clicking on a URL in an email. After they click on a link in this page I 
want to delete the page itself so it will only exist for this one use. The 
URL in the page does go to another Welcome page which is on another 
server. Do I need to include something in the second page that will do the 
deleting, or can I delete it from within the script for the first page 
that deletes as of the click on the URL. Haven't written any code yet for 
this, but I'm thinking unlink.
I think this is usually done with a link like 'confirm.php?id=23sahd', and 
with that link a database field in the usertable called 'email_confirmed' 
that was false by default and then is changed to true. Another field called 
'expires_on' with a date in it.

However back to your question. I would not delete a file that is currently 
being executed. That could lead to all sorts of confusion by the server 
and/or php. So you could pass the filename on to the second or you could 
read the $_server['http_referer'] to see the filename as url. Then i think 
you need to change that in a proper filepath, by chopping the referer off 
from the last slash (eg finding last slash with strpos() and selecting the 
end of the string with substr()). See the true file path with

echo __FILE__;

or by running php_info();

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


[PHP] $PHP_SELF with redirected domain

2003-02-26 Thread bill
If I use $PHP_SELF as the action in a form where the domain name is redirected,
I get the extra directory.

Is there a way around that?

Details:

The domain name is redirected in .htaccess like this:

RewriteCond   %{REQUEST_URI}  !domain2
RewriteRule   ^(.*)   %1/$1 [L]

So, domain2 is really a directory on domain1, but http://domain2.com will be
taken to that directory on domain 1 as if it was the http root

But, when using $PHP_SELF, I get the extra directory, so the form may start
here:

http://domain2.com/myform.php

But the $PHP_SELF forces the next POST page to be

http://domain2.com/domain2/myform.php

Ideas?

kind regards,

bill hollett


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



Re: [PHP] imagecreate()

2003-02-26 Thread Anthony Ritter
Yes Adam.
Any ideas?

TR



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



Re: [PHP] question on text file reading.

2003-02-26 Thread David Banning
On Wed, Feb 26, 2003 at 08:58:43AM -0800, Chris Shiflett wrote:
 --- David Banning [EMAIL PROTECTED] wrote:
  The company I am working with is using an old database, which 
  doesn't even support memo field beyond 256 characters, so it is probably
  too difficult, and not worth trying to interface the database with php.
  
  I was wondering how easy it would be to have php access the database
  via SQL. The data we are looking for is accessible via SQL.
 
 I think you are confused about what SQL is.
 What you need to access a database is some sort of library (driver) that
 translates your SQL statements into something specific to the database you are
 interacting with.

I may be confusing -some- terms, but I know my system. In my case,
I have a program, which is called SQL and -also- a language, which is 
also called SQL. I just put the SQL query in a file, and then execute
the SQL query file with the SQL program. Like I mentioned, like this;

$ SQL sqlqueryfile

and the result spools to the screen.

None of this matters to the question I ask, I see now, in hindsite.
What I really want to ask is, is it possible for php to execute a shell
command, and then have the results of that command be read by php,
decoded, separated and displayed as separate fields?

The result of my command;
$ SQL sqlqueryfile

might simply be

Frank   |100.00   |1
John|145.00   |2
Dave|321.56   |3

If php executed a command that normally send this result to the screen,
could php read the result and display each field as separate entities?

 For performance, you always want to try to use a native driver, but in your
 case, you might be restricted to something like ODBC. SQL is just a query
 language.

This database predates ODBC by many years.

thanks for your response -

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



Re: [PHP] $PHP_SELF with redirected domain

2003-02-26 Thread Chris Hayes
...and the problem that the form immediately goes to the real url is that 
people see the real url?

What about one of the following:

 - chop off the subdir again by only putting the last part of $PHP_SELF as 
form action (f.i. with a combination of substr($PHP_SELF,...,...) and 
strpos('/') )

or
 -  when i do a full path in the redirect in .htaccess:
ErrorDocument 404 http://www.domain.org/redirect/redirect.php
it is treated as a fresh page and all form results are lost
but when i do
ErrorDocument 404 /redirect/redirect.php
in .htaccess,  the original post and get vars stay, and i suppose 
also the  original $PHP_SELF

Maybe the same happens with your thing, i happen not to know what %1/$1 
does. If %1 is the domain, try to do it without that (but with the slash, 
so /$1 ). Worth a try innit?

or
- simply make a new page that receives the file, or not using $PHP_SELF but 
the actual filename.

At 18:42 26-2-03, you wrote:
If I use $PHP_SELF as the action in a form where the domain name is 
redirected,
I get the extra directory.

Is there a way around that?

Details:

The domain name is redirected in .htaccess like this:

RewriteCond   %{REQUEST_URI}  !domain2
RewriteRule   ^(.*)   %1/$1 [L]
So, domain2 is really a directory on domain1, but http://domain2.com will be
taken to that directory on domain 1 as if it was the http root
But, when using $PHP_SELF, I get the extra directory, so the form may start
here:
http://domain2.com/myform.php

But the $PHP_SELF forces the next POST page to be

http://domain2.com/domain2/myform.php

Ideas?

kind regards,

bill hollett

--
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] Splitting up big strings

2003-02-26 Thread {R}ichard Ashton
On Thu, 27 Feb 2003 01:02:54 +0800, Jason Wong wrote:
On Thursday 27 February 2003 00:54, {R}ichard Ashton wrote:
 I have the body ov a Usnet article, all of it, in $body. I want to
 split it into lines.

 I have tried

 $lines = explode( X, $body);

 where I have used

 X = 0x0A
 X = '0x0A'
 X = 0x0D
 X = '0x0A'
 X = \r

Try \n.

If I hadn't pushed send by mistake I would have added

X = \r
X = '\r'
X = \n
X = '\n'

I then have

echo pieces $pieces[0] br;
echo pieces $pieces[1] br;
echo pieces $pieces[2] br;
echo pieces $pieces[3] br;
echo pieces $pieces[4] br;
echo pieces $pieces[5] br;

If I look at $body with Hex editor there are lots of 0D 0A pairs and
further if I look at the source of the page generated by

echo $body; I can see the CRLF's

This is giving me pains in the neck :(

{R}


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



Re: [PHP] String searching peformance

2003-02-26 Thread {R}ichard Ashton
On Wed, 26 Feb 2003 17:47:41 +0800, Jason Wong wrote:
On Wednesday 26 February 2003 16:49, {R}ichard Ashton wrote:

 Do you think that:

 if (preg_match($re, $posting, $hits)) would slow it down at all. The
 $buzzwords will be kept in a file to be loaded before each run, every 5
 minutes. I could therefore keep a count of which words hit most
 frequently and move them to the top of the list.

No idea whether this would be faster (it's certainly easier to code):

  explode() text into an array
  place your banned words into an array
  array_intersect() to find words common in both

Thanks for another method,

Do your own benchmarking!

That is the easy bit.

{R}


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



Re: [PHP] to Jason Wong Re: [PHP] mysql trouble

2003-02-26 Thread Luis A
HTML
b)single
- Original Message - 
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 12:38 PM
Subject: Re: [PHP] to Jason Wong Re: [PHP] mysql trouble


 On Thursday 27 February 2003 01:32, Luis A wrote:
  OK IF no trouble for ud to send it to me the manual ??
 
  in spanish
 
   b) Single HTML or Multiple HTML or Windows HTML (CHM format)
 
 Which format?
 
 Also please do not change the subject (ie putting people's name into the 
 subject).
 
 -- 
 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
 --
 /*
 Life -- Love It or Leave It.
 */
 
 
 -- 
 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] non transmitted cookie

2003-02-26 Thread Dennis Gearon
Is there anyway for a page to save information on a user's computer which is 
accessible via java or 
javascript, but doesn't get sent with each HTML request the way a cookie is?

I had this idea, patterned after kerberos:

1/ A user logs into a site via a secure link.
2/ A hash salt is stored on their computer and an
   initial hash is generated for the user as a Password
   to their session key.
3/ The user is redirected to the non secure part of the site
   and they have both the hash-pw plus session key in their document.
4/ Each time they access a page on our site, a javascript fires 
   which generates the next sequence in the hash-pw.
5/ the server also generates the same new sequence and compares
   it. If the session key and the new password agree, then
   it is the user attached to the session.

So, this salt needs to NOT be transmitted via the cookie so
that it does not appear 'in the clear', which  would invalidate
it's use.

Please CC me when you reply to the list, I am on digest.



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



[PHP] Emacs?

2003-02-26 Thread Sascha Braun
How many Persons in this List are using Emacs as there default Editor?

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



Re: [PHP] imagecreate()

2003-02-26 Thread Chris Shiflett
--- Anthony Ritter [EMAIL PROTECTED] wrote:
 Yes Adam.
 Any ideas?
 
 TR

Please write emails that make sense if you are going to send them to the entire
list. I have noticed a few of these me too type of emails today.

Chris

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



[PHP] segfault of apache 2.0.44 php 4.3.1

2003-02-26 Thread Alexander Newald
Hello,

I installed the latest version of apache and php and thought all went well,
but I get a segfault with apache when I try to reload (apachectl graceful)
apache:

Here the details:

kernel: 2.4.18
httpd 2.0.44
php 4.3.1

My way of installing it:

cd httpd-2.0.44
./configure --prefix=/opt/apache/2.0.44
--enable-so
--enable-cache
--enable-mem-cache
--enable-logio
--enable-expires
--enable-unique-id
--enable-ssl
--enable-info
--enable-suexec
--enable-cgi
--enable-speling
--disable-userdir
--enable-rewrite
--enable-mime-magic
--with-mpm=worker
--with-suexec-bin=/opt/apache/2.0.44/sbin/suexe
--with-suexec-caller=wwwrun
--with-suexec-uidmin=100
--with-suexec-gidmin=100 
make  make install 
cd ..  cd php-4.3.1 
./configure --with-apxs2=/opt/apache/2.0.44/bin/apxs
--enable-experimental-zts
--prefix=/opt/php4/4.3.1
--with-mysql
--with-imagick
--enable-mailparse
--enable-trans-sid
--enable-memory-limit
--enable-ftp
--enable-gd-native-ttf
--with-ttf
--with-gettext
--with-openssl
--with-bz2
--disable-cgi
--with-zlib
--enable-calendar
--with-gd
--with-imap-ssl
--disable-debug
--with-imap=/usr/local/imapd/ 
make  make install  libtool --finish /INSTALL/php-4.3.1/libs 
cp php.ini-dist /opt/php4/4.3.1/lib/php.ini

I removed all \ for better reading

Here the logs:

[Wed Feb 26 19:24:12 2003] [notice] Apache/2.0.44 (Unix) mod_ssl/2.0.44
OpenSSL/0.9.6g PHP/4.3.1 configured -- resuming normal operations

and after /opt/apache/2.0.44/bin/apachectl graceful

[Wed Feb 26 19:31:33 2003] [notice] SIGUSR1 received.  Doing graceful
restart
[Wed Feb 26 19:31:35 2003] [notice] seg fault or similar nasty error
detected in the parent process

Thanks,

Alexander Newald



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



Re: [PHP] niklasRe: [PHP] mysql trouble

2003-02-26 Thread 1LT John W. Holmes
 On Thursday 27 February 2003 00:08, 1LT John W. Holmes wrote:
  Dude... honestly, lay off the coffee and learn to type.
 
 Shouldn't that be cigars?

I guess so. He can send the cigars to me!! :)

John


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



[PHP] Page processing/display anomaly

2003-02-26 Thread acleave
I have a common header for all the pages on my site.  This header has a link 
with the following code:

javascript:popUp550_450('http://www.website.com/page.php?referingpage=?php
echo ($_SERVER['SERVER_NAME']); echo ($_SERVER['PHP_SELF']); ?')

This code works exactly right on all pages of the site except one.  On the 
page answer.php, it doesn't evalutate the php code in the above (so the link 
literally is just as shown above and the javascript won't even call for a 
pop-up window).  answer.php usually has some get variables attached, like so:  
answer.php?showanswer=dog  but even when I type in exactly answer.php with no 
variables added, the php portion of the link won't evaluate/work.

Does anyone have any idea as to why?  It's a php page, shouldn't it evaluate?

Allan Cleaveland
Webmaster and Computer Technician
Math Department
Univeristy of Arkansas


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



Re: [PHP] imagecreate()

2003-02-26 Thread Anthony Ritter
Fine Chris.

Maybe you'd be kind enough to explain how I can get that function to work.

I've uncommented the line in the php.ini file.

In Mastering PHP (Sybex) on page 559 - Chapter 18, the authors of the
textbook - Allen and Hornberger - say when using Win to:
...
uncomment it; that's it.  Restart your webserver. That's all it takes.
...

Please advise on the steps if you get a chance.

Tony Ritter







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



Re: [PHP] Too many connections - MySQL

2003-02-26 Thread 1LT John W. Holmes
There is a setting in MySQL for the max_connections. You just need to
increase this. If you're using persistent connections, do some research on
them and make sure you really need to be using them. They will eat up your
connections and cause you to have this error more quickly.

---John Holmes...

- Original Message -
From: Stephen Craton [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 12:23 PM
Subject: [PHP] Too many connections - MySQL


On this site, www.roempire.com, which we host, they are having problems with
too many connections. I think that someone messed with the GRANT option. How
can we reverse this and allow unlimited connections per site? Or is this a
problem with the script?

Thanks,
Stephen Craton
http://www.melchior.us



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



  1   2   >