Re: [PHP] Problems with PHP and MySQL

2005-02-05 Thread Bruce Douglas
disregard if you've already done this...

you might want to do a quick php app with phpinfo, to determine if/what version 
of mysql php sees.. it's quite possible that php isn't seeing/interfacing with 
mysql. 

php needs to not only be built with a version of mysql, but the php.ini file 
also needs to be setup correctly.

-bruce


-Original Message-
From: Jochem Maas [EMAIL PROTECTED]
Sent: Feb 5, 2005 8:46 AM
To: Sarah [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] Problems with PHP and MySQL

Sarah wrote:
 Hi,
 
 I'm relatively new to PHP, but have already written a few functional 
 web-based scripts. I recently decided to implement a MySQL-based system, 
 but hit the following problem...
 
 I have PHP version 5.03, and MySQL v 4.19. I downloaded and compiled 
 both, and both work perfectly alone. However, when I run a command-line 
 app to manipulate my database, I get the following error:
 
 __
 [EMAIL PROTECTED]:~# ./useradmin -a -u unclebulgaria -p uberwomble
 constructor called
 
 Fatal error: Call to undefined function mysql_connect() in 
 veep/useradmin on line 16
 
 Fatal error: Call to undefined function mysql_close() in /veep/useradmin 
 on line 22
 [EMAIL PROTECTED]:~#
 __
 

I _think_, given the version of MySQL you are using, you should compile in
and use the mysqli extension iso of the mysql extension.
 ^!

these to links may help you:

http://www.zend.com/php5/articles/php5-mysqli.php
http://be.php.net/mysqli

failing that you might want to check this page for an overview of funcs you
can use to determine exactly what is available, with more accuracy than 
phpinfo()
e.g.:

var_dump( extension_loaded(mysql),
  extension_loaded(mysqli),
  get_loaded_extensions(),
  get_extension_funcs (mysql),
  get_extension_funcs (mysqli) ); 

-- 
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] Problems with PHP and MySQL

2005-02-05 Thread Bruce Douglas
sarah...

rather than deal with classes/objs... (at least initially)

just create a simple php/mysql app that sets up the user/passwd/host for the 
db, and see if you can do a successful mysql_connect check the return/error 
codes to see if the call/code works

this will quickly tell you if you actually have php/mysql setup properly...

once you've done this... you can get into the guts of your app, to determine 
where the prob is

-bruce


-Original Message-
From: Sarah [EMAIL PROTECTED]
Sent: Feb 5, 2005 7:41 AM
To: php-general@lists.php.net
Subject: [PHP] Problems with PHP and MySQL

Hi,

I'm relatively new to PHP, but have already written a few functional 
web-based scripts. I recently decided to implement a MySQL-based system, 
but hit the following problem...

I have PHP version 5.03, and MySQL v 4.19. I downloaded and compiled 
both, and both work perfectly alone. However, when I run a command-line 
app to manipulate my database, I get the following error:

__
[EMAIL PROTECTED]:~# ./useradmin -a -u unclebulgaria -p uberwomble
constructor called

Fatal error: Call to undefined function mysql_connect() in 
veep/useradmin on line 16

Fatal error: Call to undefined function mysql_close() in /veep/useradmin 
on line 22
[EMAIL PROTECTED]:~#
__


You might think 'Aah! the doofus has forgotten to link MySQL into the 
compiled PHP interpreter'.

However, my phpinfo() page gives the following information:

__
Configure command:

'./configure' '--with-apxs2=/opt/apache/sbin/apxs' '--prefix=/usr' 
'--sysconfdir=/etc/php5' '--with-dba' '--with-db4' '--with-auth' 
'--with-zlib' '--with-tiff' '--with-jpeg' '--with-mysql=/usr'
__

And...

__

MySQL-related data:

mysql
MySQL Support   enabled
Active Persistent Links 0
Active Links0
Client API version  4.1.9
MYSQL_MODULE_TYPE   external
MYSQL_SOCKET/tmp/mysql.sock
MYSQL_INCLUDE   -I/usr/include/mysql
MYSQL_LIBS  -L/usr/lib -lmysqlclient

Directive   Local Value Master Value
mysql.allow_persistent  On  On
mysql.connect_timeout   60  60
mysql.default_host  localhost   localhost
mysql.default_password  wurms   wurms
mysql.default_port  33063306
mysql.default_socketno valueno value
mysql.default_user  wiggly  wiggly
mysql.max_links Unlimited   Unlimited
mysql.max_persistentUnlimited   Unlimited
mysql.trace_modeOff Off
_


Finally, the client program is:

_

#!/usr/bin/php
?php

class UserDB
{
static $user='wiggly';
static $pass='wurms';
static $db='multimedia_access';

private $m_link;
private $m_live;

function __construct()
{
print(constructor called\n);
$this-m_link = mysql_connect('localhost', self::$user, 
self::$pass);
$this-m_live = mysql_select_db(self::db);
}

function __destruct()
{
mysql_close($this-m_link);
print(destructor called);
}

function Add($u, $p)
{
$H = md5($u, true);
// $R = mysql_query(INSERT INTO users (userkey, user, 
password) 
values ($H, $u, $p), $this-m_link);
$S = mysql_real_escape_string(INSERT INTO users (userkey, 
user, 
password) values ('$H', '$u', '$p'), $this-m_link);
$R = mysql_query($S, $this-m_link);
if (!$R)
{
printf(SQL query error during Add operation\n);
}
return $R;
}

function Delete($u)
{
$H=md5($u, true);
$R=mysql_query(DELETE FROM users WHERE userkey=$H);
if ($R)
{
$R=mysql_query(DELETE FROM iplist WHERE userkey=$H);
}
if (!$R)
{
printf(SQL query error during Add operation\n);
}
return $R;
}

function Replace($u, $p)
{
return 0;
}

function Tabulate()
{
$R=mysql_query(SELECT user,password FROM TABLE users);
if (!$R)
{
printf(SQL query error during List operation\n);
}


[PHP] in need of php code for user management/admin function...

2005-01-27 Thread Bruce Douglas
hi...

i'm looking for 'open source' code that can be used in a website for handling 
user registration, user admin functions... does anybody know of a good set of 
functions that can provide this kind of feature set. or, can anybody give me 
opinions regarding apps that you've used that have had this kind of 
functionality...

as long as the code is open source, i can rip out/recode the functionality that 
i'm looking for...

i'm looking for something that would be mysql based, with the ability to allow 
users to register/login, and have an admin function that allows the admin to 
deny/enable/disable users, as well as track various attributes within the 
site...

if i have the basic shell/structure, i can modify the code to my needs.. 

comments/criticisms/thoughts...

thanks

bruce
[EMAIL PROTECTED]

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



[PHP] in need of a directory/listing script/app

2005-01-26 Thread Bruce Douglas
hi...

i'm looking for a good app/function/code to allow users to select a given 
item(s) from a list of categories. i'd also like the user to be able to display 
users who have selected a given category from the list...

i can't seem to find an app that has this kind of code incorporated...

thanks

bruce
[EMAIL PROTECTED]

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



[PHP] ldap functionality

2005-01-25 Thread Bruce Douglas
hi...

i'm in need of an app that has/should have directory/user/member functionality. 
i want to setup a process to allow an adim to create different fields and 
categories for a user to enter. think of a company employee database, where you 
have the employe name, and then the various groups/projects the employee might 
belong to...

i'm trying to figure out if there's already an app that you may have run across 
that kind of does this, and if you haven't, what might be the best soln/easiest 
soln to implement.. i've started to research ldap, but i'm not sure that this 
is the best approach (given that i have no experience with ldap!)

i'm open to a php/perl/linux/mysql/apache solution.

searching through php/google hasn't turned up anything as of yet...

if you have any thoughts let me know...


thanks

bruce
[EMAIL PROTECTED]

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



Re: [PHP] Understanding intval() and types conversion

2005-01-25 Thread Bruce Douglas
so...

you're saying that 7.9 (repeating) is equal to 8.0

i say prove it..  as i recall the numbers might be for all practical purposes 
the same, they are in fact vastly different...

so, prove your assertion...

-bruce


-Original Message-
From: Richard Lynch [EMAIL PROTECTED]
Sent: Jan 25, 2005 2:57 PM
To: Jochem Maas [EMAIL PROTECTED]
Cc: Jordi Canals [EMAIL PROTECTED], PHP List php-general@lists.php.net
Subject: Re: [PHP] Understanding intval() and types conversion

 my guess this is a round error issue - never noticed this problem
 before...
 this is a problem right? anybody?

You can say it is a round error issue.

You can not say it is a problem.

You simply have to be aware that the float number which you think of as
8.... inside of PHP may well be represented as
7.... down in the guts of the machine.

It may help you feel better about this if you recall from grade school
mathematics, that, in point of fact:
7.999... is EXACTLY equal to 8.000...

Those who doubt this fact are requested to remember how to convert
decimals such as:
0.333...
to fractions (1/3), and then apply that exact same method to 7.999...

You will quickly find yourself with a fraction (72/9) which is precisely
equal to 8/1 which is 8.

EVERY floating point number, then, that ends in x000... has a second
representation, exactly equal, which ends in (x-1)999...

Bottom line, however you look at it, is that you can NEVER be 100% certain
that a computer's float number will convert to what you expect in an
integer because their internal representation simply does not allow for
perfection.

This is a feature, not a bug. :-)

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

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

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



Re: [PHP] Understanding intval() and types conversion

2005-01-25 Thread Bruce Douglas
no..

he didn't.

8.0 = 8.0

7. (repeating) = 7. (repeating)

8.0 != 7. (repeating)

now, if you want to get into conversations with regards to internal binary 
representations because of the limits of the register architecture in 
computers, then i might say the issue is the fact that the algorithms employed 
within the hardware are flawed...

but let's not start screwing with basic math theory

the statement that he uses where he states that there is a limit to the level 
of precision is lazy at best... (from a mathmatical perspective)  or can i 
simply say, 15000 = 14,800 based upon my level of precision

-bruce



-Original Message-
From: Jochem Maas [EMAIL PROTECTED]
Sent: Jan 25, 2005 3:42 PM
To: Bruce Douglas [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED], Jordi Canals [EMAIL PROTECTED], 
PHP List php-general@lists.php.net
Subject: Re: [PHP] Understanding intval() and types conversion

Bruce Douglas wrote:
 so...
 
 you're saying that 7.9 (repeating) is equal to 8.0
 
 i say prove it..  as i recall the numbers might be for all practical purposes 
 the same, they are in fact vastly different...
 
 so, prove your assertion...

he did.

you have to consider the two the same, given that there is always a limit to the
level of precision - the alternative would be to say no 2 numbers are ever 
equal and
that make for boring mathematics.

actually the underlying maths kinda makes my head spin :-)

 
 -bruce
 
 
 -Original Message-
 From: Richard Lynch [EMAIL PROTECTED]
 Sent: Jan 25, 2005 2:57 PM
 To: Jochem Maas [EMAIL PROTECTED]
 Cc: Jordi Canals [EMAIL PROTECTED], PHP List php-general@lists.php.net
 Subject: Re: [PHP] Understanding intval() and types conversion
 
 
my guess this is a round error issue - never noticed this problem
before...
this is a problem right? anybody?
 
 
 You can say it is a round error issue.
 
 You can not say it is a problem.
 
 You simply have to be aware that the float number which you think of as
 8.... inside of PHP may well be represented as
 7.... down in the guts of the machine.
 
 It may help you feel better about this if you recall from grade school
 mathematics, that, in point of fact:
 7.999... is EXACTLY equal to 8.000...
 
 Those who doubt this fact are requested to remember how to convert
 decimals such as:
 0.333...
 to fractions (1/3), and then apply that exact same method to 7.999...
 
 You will quickly find yourself with a fraction (72/9) which is precisely
 equal to 8/1 which is 8.
 
 EVERY floating point number, then, that ends in x000... has a second
 representation, exactly equal, which ends in (x-1)999...
 
 Bottom line, however you look at it, is that you can NEVER be 100% certain
 that a computer's float number will convert to what you expect in an
 integer because their internal representation simply does not allow for
 perfection.
 
 This is a feature, not a bug. :-)
 

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



[PHP] looking for a combination contact application/social networking app

2005-01-22 Thread Bruce Douglas
hi...

i'm in need of a glorified contact type application. i want/need to be able to 
allow
users to enter their information into the system, specify what category(s) they 
belong to, be able to see others, rank others, etc...

i also would like to be able to have some form of relational/6-degrees/ryze type
of system so the users can see/find others with similar interests.. 

and of course, i'd like this to be open source!!!

anbody have any ideas, or seen anything closely resembling anything like this.. 
i'd even be willing to look at multiple apps, with the intent of putting them 
together
as a comprehensive app!!

thanks

bruce
[EMAIL PROTECTED]

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



Re: [PHP] NT domain info

2005-01-19 Thread Bruce Douglas
mikey...

i'm not a guru... but this sounds like something that someone should have 
already done (or thought about) in perl. you might find that there's already a 
perl app/solution that gets you close to what you need, that would allow you to 
either use the perl solution, or rewrite what it does in php...

good luck!!

bruce


-Original Message-
From: Mikey [EMAIL PROTECTED]
Sent: Jan 19, 2005 4:13 PM
To: '[php] PHP General List' php-general@lists.php.net
Subject: [PHP] NT domain info

Hi NG!

Does anyone here know of a way of getting at the user account information
from a windows domain controller from a Linux box, specifically in PHP?

I was thinking of writing a COM object for the windows box running a simple
socket service for updates, but that seems like an awful lot of coding (not
to mention having to write COM garbage).  Has anyone else here had to tackle
a similar problem, or does anyone know enough about Windows and domain
accounts to be able to point me in the right direction?

TIA,

Mikey

-- 
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] Apache Server with php

2005-01-04 Thread Bruce Douglas
richard...

i'm not sure of the email/list name.. but there is an apache email list.. if 
you get to the apache.org site.. they could help you.. they're actually pretty 
good.. sorry i don't have the name right at my fingers right now!!

good luck...



-Original Message-
From: Richard Lynch [EMAIL PROTECTED]
Sent: Jan 4, 2005 12:31 PM
To: Ramiro Trevino [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] Apache Server with php

Ramiro Trevino wrote:
 I am having issues with the installation and configuration of my Apache
 server 2.0.52(win32). All is well when I restart the server with the
 exception of, when I load the following lines.

 I opened up the httpd.conf file and searched for #LoadModule ssl_module
 modules/mod_ssl.so.
 Directly underneath that line, I added LoadModule php4_module
 D:/php/sapi/php4apache2.dll.
 My plan was to run PHP as a module for Apache, instead of as a CGI binary
 but
 every time I add this line my server will not restart but I get an error
 stating The requested operation has failed.

 I checked to ensure the path was correct to this dll and all is well. Any
 suggestions?

I don't think you are allowed to specify a full path to your DLL.

Copy the php4apache2.dll into the same directory where the SSL DLL is, and
change the LoadModule to match as much as possible.

Actually, if there are *ANY* other *working* Apache modules, use those as
your guideline instead.  You've got SSL commented out, so it's not much of
a guideline to follow, since it's not working (on purpose)

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

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

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



[PHP] distributed architecture....

2004-12-30 Thread Bruce Douglas
hi...

i'm contemplating a project where a number of websites would communicate with 
each other via some network of round robin/distributed servers. Each 'client' 
website/app would be considered to be a 'node' of the overall network, and be 
able to upload/download information to the network. The master servers would 
maintain the information, such that if a request for information came from one 
of the 'client' sites, the master server would shove the information back to 
the client for display. 

the overall goal of the project would be a way of allowing a client site to 
'share/exchange' information with other client sites within the network, and to 
allow the content of a given client site to be influenced by the content of 
other sites within the network...

has anybody heard/seen anything like this...??

in searching google/sourceforge/freenet/etc.. i can't find anything that's 
similar, or that could be used as a starting point for the architecture... the 
closest i can find is the open source gnutella/limeware p2p app structure...

thanks

bruce
[EMAIL PROTECTED]

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



Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread Bruce Douglas
if you want to know/have a rough guide on building/compiling php with 
mysql/mysqli support, the following link should help you out... although it's 
for linux..


http://marc.theaimsgroup.com/?l=php-generalm=109026859726530w=2

it kind of walks you through what you need to do..

hope it helps...

peace..



-Original Message-
From: Rory Browne [EMAIL PROTECTED]
Sent: Dec 30, 2004 11:00 AM
To: php-general@lists.php.net
Subject: Re: [PHP] what am I doing wrong? PHP5 on Fedora

Sorry if you recieved this twice. Head's wreaked today, and I keep
making mistakes, such as posting to a person instead of to the list.

If you're using apache2 then you need to add something along the lines
of --with-apxs to your ./configure line. With apache1.3 it was
--with-apxs=/path/to/apxs. I'm not sure what whether it's still
--with-apxs, or --with-apxs2, but either way you'll probably be
looking for the path to apxs2. Just for your information apxs is the
APache eXtension System.

If you want to use locate, on recently created files, then you should
schedule locate to run updatedb more often. your locate is only as
recent as your last updatedb.


On Thu, 30 Dec 2004 10:39:50 -0500, blackwater dev
[EMAIL PROTECTED] wrote:
 I don't seem to have an apxs directory.  I don't even have an apache
 directory as apachectl resides in /usr/sbin/apachectl
 
 Of course apache was installed from the fedora install.
 
 How do I install this against apache?
 
 On Thu, 30 Dec 2004 10:20:01 -0500, John Nichel [EMAIL PROTECTED] wrote:
  blackwater dev wrote:
   **First let me say that I am a linux newbie**
  
   I have installed Fedora 3 on a development box.  I then downloaded the
   php5 source and followed the php documentation:
   # ./configure --with-mysql
   # make
   # make install
 
  What did you build it against?  You have no webserver type in your
  configure line.  If I'm not mistaken, all you have above  will do is
  build the cli, and not the loadable module.
 
  --
  John C. Nichel
  ÜberGeek
  KegWorks.com
  716.856.9675
  [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 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] Compiling PHP Source guides

2004-12-22 Thread Bruce Douglas
if you want to know/have a rough guide on building/compiling php with 
mysql/mysqli support, the following link should help you out... although it's 
for linux..


http://marc.theaimsgroup.com/?l=php-generalm=109026859726530w=2

it kind of walks you through what you need to do..

hope it helps...

peace..


-Original Message-
From: [EMAIL PROTECTED]
Sent: Dec 22, 2004 2:10 PM
To: Donald Tyler [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] Compiling PHP Source guides

Quoting Donald Tyler [EMAIL PROTECTED]:

 I did RTFM. The exact page you linked to in fact:

 QUOTE:


   Requirements

 In order to have these functions available, you must compile PHP with
 support for the mysqli extension.


 END QUOTE

 That is the whole point of my request. I need a guide explaining *how*
 to compile the PHP Source.

The directions to compile the PHP source *are* on the page at
http://us4.php.net/manual/en/install.unix.php -- you compile it using the
make steps in the directions there.

(But it seems the problem is that you don't recognize those as compilation
instructions, which is understandable if you're a newbie.  The page also says
that

 Basic Unix skills (being able to operate make and a C compiler)

are a prerequisite, so you probably should find a person you can rely on to
deliver those skills repeatably or teach them to you, which is not something
you really get from a mailing list.  Get a good intor Unix book.  After all,
you wouldn't expect that if you subscribed to a heart surgery mailing list and
said I'm a complete newbie -- can you tell me how to do a quadruple bypass?
someone would step you through it?  Yes, there are differences in degree,
but...!  :)

-- 
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] can I compile php source

2004-12-21 Thread Bruce Douglas
after looking at the msgs on this list for this thread...

i'm curious. if you see an email that you don't want to respond to, why can't 
you simply choose not to respond to it, and ignore the msg.

peace..




-Original Message-
From: Paul Aviles [EMAIL PROTECTED]
Sent: Dec 21, 2004 7:48 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can I compile php source

some people will never get it.

- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: Paul Aviles [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 10:41 AM
Subject: RE: [PHP] can I compile php source


 [snip]
 no sympathy, reality.
 
 So, if someone asks how to past the max_upload size limit will you send
 them 
 to google or maybe point them to your web site how-to?
 
 hmmm.
 
 be kind, is free, and people will respect you more.
 [/snip]
 
 Nope, because the question requires more than a yes or no answer. I
 would most likely say something like...
 
 RTFM... http://us2.php.net/manual/en/features.file-upload.php
 
 I am not on this list to earn respect. I am here to learn and where
 possible, teach. And if you want people to be more politically correct
 so no one gets insulted or gets their feelings hurt you have come to
 the wrong place.
 
 -- 
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.
 



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
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] can I compile php source

2004-12-21 Thread Bruce Douglas

now guys/ladies.. this was funny! 

and can we move on... !



-Original Message-
From: Matthew Sims [EMAIL PROTECTED]
Sent: Dec 21, 2004 1:35 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can I compile php source

 On Wednesday 22 December 2004 01:37, Paul Aviles wrote:
 Guys, this is trivial. It takes the same effort to provide the answer to
 whoever this guy was, than to lecture him on how to think.

 Teach a person to fish ...

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz

You know, I bet that man is getting sick of eating fish all the time.

Teach a man to shoot a cow...

-- 
--Matthew Sims
--http://killermookie.org

-- 
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] can I compile php source

2004-12-20 Thread Bruce Douglas

and this response was helpful to the guy who asked the original question, 
how 

i mean, aside from showing that you know how to do a link, what did you show

peace...



-Original Message-
From: John Nichel [EMAIL PROTECTED]
Sent: Dec 20, 2004 4:32 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can I compile php source

QT wrote:
 hi,
 
 is there any way to compile php source to make binary file for protecting
 source code?
 
 best regards
 

Yes.

http://www.catb.org/~esr/faqs/smart-questions.html

-- 
By-Tor.com
...it's all about the Rush
http://www.by-tor.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] Delivering large files via PHP (300MB)

2004-12-13 Thread Bruce Douglas
hi..

you might also look into 'bit torrent'...

peace..


-Original Message-
From: Richard Davey [EMAIL PROTECTED]
Sent: Dec 13, 2004 11:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Delivering large files via PHP (300MB)

Hi all,

   Just thought I would pick the collective brain on this one. I have
   a requirement to deliver a large EXE file to customers after they
   order. The file is just under 400 MB in size and, because they have
   just purchased it, I obviously cannot have this file in a public
   location on the web server that someone could browse to.

   I can push the file out quite easily using a modified header and a
   simple script to check if they can download it or not, but with
   such a large file a significant number of web browsers fail to
   obtain the entire EXE before closing - or any other number of
   factors kick into play (their PC resets, ISP disconnects, Windows
   crashes, etc).

   Some browsers support resuming download, but not when the file has
   been sent via the headers I use, also FTP is not an option as I
   cannot create and destroy FTP users on the server easily (or for
   that matter assume the customer knows how to perform FTP
   operations).

   I'm also aware that it's not such a hot idea to lock-up Apache for
   the time it takes to download the whole file, especially with a
   large number of users doing this.
   
   So I came up with an idea that I'd like your opinions on: I built a
   small but friendly Windows application (50KB in size) that will
   connect to the web server via HTTPS, check the download credentials
   and if all is ok, it then downloads the file via HTTP in 1MB
   chunks. The file is just a single EXE file sat outside of my web
   root, and the PHP script that serves the file uses fopen() to open
   the file, then fseeks to the required section of it, reads in 1MB
   worth of data, closes the file and then echos this out (after
   suitable headers of course, shown below)

   header('Content-Type: application/force-download');
   header('Content-Transfer-Encoding: Binary');
   header(Content-Length: $total_chunksize);
   header(Content-Disposition: attachment; filename=\$chunkname\);

   The Windows app performs various checks on the file segments as
   they download and eventually stitches the whole thing back together
   at the end (there is a resume download feature so you can come
   back to it at a later time if you need, or your ISP disconnects).

   A quick MD5 file integrity check with the server confirms the file has
   downloaded fully.

   I have tested this out on some massive files across a range of PCs
   and Windows installations and it works perfectly, so I'm happy that
   the Windows side of things is correct. But I would be interested to
   hear peoples views on the PHP side of the equation - would it be
   better for Apache to be running PHP scripts that shove out smaller
   1MB chunks as opposed to doing a fpassthru on a 300MB+ file? Or do
   you think there is another more elegant solution?

   I'm aware my app is for Windows only (although I could easily port
   it to OS X), but the files they are downloading are PC games
   anyway, so it's no bad thing in this case.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I am not young enough to know everything. - Oscar Wilde

-- 
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] reading/writing the value of an UL/LI text value

2003-06-09 Thread Bruce Douglas
Hi.

I have a question regarding the DOM model. Does anyone know how to write to
the UL/LI text value using the DOM model. I more or less can write to
select/option attributes of the DOM. but I can't figure out how to write
(or read) the text of a UL-LI attribute

I'd like to be able to do something like:

echo
document.foo.element.LU.LI.text = dfdgd;
;
(of course, using whatever the appropriate doument string would be...)

Any pointers/code samples/web sites would be helpful


Thanks

Bruce
[EMAIL PROTECTED]
(925) 866-2790



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



[PHP] php/sendmail/apache/linux...

2003-01-24 Thread Bruce Douglas
hey...

I'm sure the question has been answered a 1000 times!!! I'm trying to create
a simple app to send email via PHP, using the mail function.

I'm using RedHat(Linux 8.0 , Sendmail), PHP(4.2.2), Apache (2.0.40).

I'm using the following piece of code:

===
//test mail
$to = [EMAIL PROTECTED];
$subject = savannah registration;
$message =  testing mail;
$reply = From: [EMAIL PROTECTED]\r\n
.Reply-To: [EMAIL PROTECTED]\r\n;

echo
 to =  . $to . br;

echo
 subject =  . $subject . br;

echo
 msg =  . $message . br;

echo
 reply =  . $reply . br;

 $q1 = mail($to, $subject, $message, $reply);
echo
 return val  =  . $q1 . br;


===

Pretty simple eh... The problem that I have is that the mail doesn't appear
to get sent. When I look in the /var/spool/clientmqueue directory, I see a
great deal of what look to be error msgs They appear to be telling me
that the mail couldn't be delivered, but I can't tell why

I was able to successfully send a test msg via Sendmail from the command
line by telnet. So I know the Sendmail engine/daemon seems to be
performing... The PHP.ini file appears to be setup correctly, with the
sendmail_path pointing to sendamil.

Any ideas as to what I need to do, or should be checking

Any pointers/assistance would be greatly appreciated.


Thanks

-Bruce
[EMAIL PROTECTED]



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




[PHP] RE: php/sendmail/apache/linux...

2003-01-24 Thread Bruce Douglas
Brian

The following information is what I have...

I created the following PHP app I'm running it from the command line.

-
#! /usr/bin/php -q
?
#
# a.php - test app for the php mail function
#
$toaddress = [EMAIL PROTECTED];
$subject = test;
$content = Name: www \n
   .E-mail Address: [EMAIL PROTECTED] \n;

$e = mail($toaddress, $subject, $content);

if ($e == False)
{
echo mail = false\n;
}
else
{
 echo mail = true\n;
}
?
-

The response was:
---

mail = false

---


As you can see, the mail app failed.. The information from the
/var/spool/clientmqueue/ dir is:


[root@lserver2 savannah]# more  /var/spool/clientmqueue/dfh0P2qeLE006055

This is a MIME-encapsulated message

--h0P2qeLE006055.1043463166/lserver2.mesa.com

The original message was received at Fri, 24 Jan 2003 18:52:40 -0800
from root@localhost

   - The following addresses had permanent fatal errors -
[EMAIL PROTECTED]
(expanded from: [EMAIL PROTECTED])

   - Transcript of session follows -
550 5.1.2 [EMAIL PROTECTED] Host unknown (Name server: [localhost]:
host not found)

--h0P2qeLE006055.1043463166/lserver2.mesa.com
Content-Type: message/delivery-status

Reporting-MTA: dns; lserver2.mesa.com
Arrival-Date: Fri, 24 Jan 2003 18:52:40 -0800

Final-Recipient: RFC822; [EMAIL PROTECTED]
Action: failed
Status: 5.1.2
Remote-MTA: DNS; [localhost]
Last-Attempt-Date: Fri, 24 Jan 2003 18:52:45 -0800

--h0P2qeLE006055.1043463166/lserver2.mesa.com
Content-Type: message/rfc822

Return-Path: root
Received: (from root@localhost)
  by lserver2.mesa.com (8.12.5/8.12.5/Submit) id h0P2qeLD006055;
  Fri, 24 Jan 2003 18:52:40 -0800
Date: Fri, 24 Jan 2003 18:52:40 -0800
From: root root
Message-Id: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: test

Name: www
E-mail Address: [EMAIL PROTECTED]


--h0P2qeLE006055.1043463166/lserver2.mesa.com--

==

[root@lserver2 savannah]# more  /var/spool/clientmqueue/Qfh0P2qeLE006055
V6
T1043463166
K0
N0
P31120
I3/2/1991420
Fr
$_localhost
$r
$slocalhost
${daemon_flags}c u
SMAILER-DAEMON
C:root
rRFC822; [EMAIL PROTECTED]
RPF:root
H?P?Return-Path: g
H??Received: from localhost (localhost)
  by lserver2.mesa.com (8.12.5/8.12.5/Submit) id h0P2qeLE006055;
  Fri, 24 Jan 2003 18:52:46 -0800
H?D?Date: Fri, 24 Jan 2003 18:52:46 -0800
H?F?From: Mail Delivery Subsystem MAILER-DAEMON
H?x?Full-Name: Mail Delivery Subsystem
H?M?Message-Id: [EMAIL PROTECTED]
H??To: root
H??MIME-Version: 1.0
H??Content-Type: multipart/report; report-type=delivery-status;
  boundary=h0P2qeLE006055.1043463166/lserver2.mesa.com
H??Subject: Returned mail: see transcript for details
H??Auto-Submitted: auto-generated (failure)
.



The above files are pretty much greek to me!! Other than telling me it can't
seem to handle the [EMAIL PROTECTED] address... which is odd... As a
test, I changed the email address.. I get the same response...

Is there something that I'm missing that has to be set for this to work

I have Linux Redhat 8.0, PHP 4.2.2...

I have the sendmail RPM and the PHP RPMs from the Redhat 8.0 installation
disks

Any help/assistance will be appreciated

Thanks...

Bruce
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Brian Schmidt
Sent: Friday, January 24, 2003 6:04 PM
To: [EMAIL PROTECTED]
Subject: RE: php/sendmail/apache/linux...


On Fri, 24 Jan 2003, Bruce Douglas wrote:

 However, as I stated, I'm fairly sure that the Sendmail app is working
given
 that I was able to send an email from the command line when i did a telnet
 localhost 25

 I'm just not certain as to how to do it through PHP

Bruce,
How about trying something really simple like this. I know it works.
It's part of an HTML form I've used, so you'll need one with a $name,
$email, and $morestuff input section:

  $toaddress = [EMAIL PROTECTED];
  $subject = My Subject;
  $mailcontent = Name: .$name.\n
 .E-mail Address: .$email.\n
 .Additional Information: \n.$morestuff.\n;
  mail($toaddress, $subject, $mailcontent);


 thanks

 bruce
 [EMAIL PROTECTED]


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Lucas Albers
 Sent: Friday, January 24, 2003 4:12 PM
 To: [EMAIL PROTECTED]
 Subject: RE: php/sendmail/apache/linux...


 Test the mailserver with the command

 cat message.txt | mail -f [EMAIL PROTECTED]

 User the Perl sendmail mail wrapper to send the mail.
 http://search.cpan.org/src/MIVKOVIC/Mail-Sendmail-0.78_5/README


  --Luke
  --Computer Science Sysadmin, MSU Bozeman
  --admin(AT)cs.montana.edu 994-3931

  -Original Message

[PHP] a simple getenv question....

2003-01-22 Thread Bruce Douglas
Hi...

A simple question... In the following code:

?

$ip = getenv(REMOTE_ADDR);

echo  ip = .$ip;

echo  ip =  . getenv(REMOTE_ADDR);

echo  ip =  . getenv('REMOTE_ADDR');

echo  ip = . $REMOTE_ADDR;--

?

I can only seem to get the last line to display the correct value. It's as
if I can't seem to get/return any of the SERVER environment variables using
the getenv() function

I'm using Apache 2.0.40, PHP 4.2.2 on Linux RedHat 8.0.

I've checked through the PHP.INI file, but couldn't seem to find why this
might be occuring. Any help/assistance would be appreciated.

thanks

bruce
[EMAIL PROTECTED]



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




RE: [PHP] a simple getenv question....

2003-01-22 Thread Bruce Douglas
phpinfo() returns everything as expected.. but not having the code .. i
don't know what internal method it uses to access the information...

but thanks...

-bruce


-Original Message-
From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 4:18 PM
To: 'Jim Lucas'; 'Bruce Douglas'; [EMAIL PROTECTED]
Subject: RE: [PHP] a simple getenv question


The simplest way to start looking would be phpinfo() page for starters.


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Jim Lucas [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 23 January 2003 10:15 AM
 To: Bruce Douglas; [EMAIL PROTECTED]
 Subject: Re: [PHP] a simple getenv question


 just copied your code and it worked fine for me.

 system: Apache 1.3.26
 PHP 4.2.2

 I would look into apache 2.0 and the env vars that are
 available from it.


 - Original Message -
 From: Bruce Douglas [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 22, 2003 3:57 PM
 Subject: [PHP] a simple getenv question


  Hi...
 
  A simple question... In the following code:
 
  ?
 
  $ip = getenv(REMOTE_ADDR);
 
  echo  ip = .$ip;
 
  echo  ip =  . getenv(REMOTE_ADDR);
 
  echo  ip =  . getenv('REMOTE_ADDR');
 
  echo  ip = . $REMOTE_ADDR; --
 
  ?
 
  I can only seem to get the last line to display the correct value.
  It's as if I can't seem to get/return any of the SERVER environment
  variables
 using
  the getenv() function
 
  I'm using Apache 2.0.40, PHP 4.2.2 on Linux RedHat 8.0.
 
  I've checked through the PHP.INI file, but couldn't seem to
 find why
  this might be occuring. Any help/assistance would be
 appreciated.
 
  thanks
 
  bruce
  [EMAIL PROTECTED]
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



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



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


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




RE: [PHP] a simple getenv question....

2003-01-22 Thread Bruce Douglas
Timothy,

Thanks for your input.. but I was trying to get a better understanding as to
why the getenv() function was apparently not returning the SERVER
environment vars.

thanks

-bruce


-Original Message-
From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 4:39 PM
To: 'Bruce Douglas'; [EMAIL PROTECTED]
Subject: RE: [PHP] a simple getenv question


Do this:

?php

print_r($_SERVER);

?

If what you want is here this just use: $_SERVER['REMOTE_ADDR'] etc

You will need to have a look at the source of the output as the rendered
view will look a little strange.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Bruce Douglas [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 23 January 2003 10:33 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] a simple getenv question


 phpinfo() returns everything as expected.. but not having the
 code .. i don't know what internal method it uses to access
 the information...

 but thanks...

 -bruce


 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 22, 2003 4:18 PM
 To: 'Jim Lucas'; 'Bruce Douglas'; [EMAIL PROTECTED]
 Subject: RE: [PHP] a simple getenv question


 The simplest way to start looking would be phpinfo() page for
 starters.


 Timothy Hitchens (HiTCHO)
 Open Source Consulting
 e-mail: [EMAIL PROTECTED]

  -Original Message-
  From: Jim Lucas [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, 23 January 2003 10:15 AM
  To: Bruce Douglas; [EMAIL PROTECTED]
  Subject: Re: [PHP] a simple getenv question
 
 
  just copied your code and it worked fine for me.
 
  system: Apache 1.3.26
  PHP 4.2.2
 
  I would look into apache 2.0 and the env vars that are
 available from
  it.
 
 
  - Original Message -
  From: Bruce Douglas [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, January 22, 2003 3:57 PM
  Subject: [PHP] a simple getenv question
 
 
   Hi...
  
   A simple question... In the following code:
  
   ?
  
   $ip = getenv(REMOTE_ADDR);
  
   echo  ip = .$ip;
  
   echo  ip =  . getenv(REMOTE_ADDR);
  
   echo  ip =  . getenv('REMOTE_ADDR');
  
   echo  ip = . $REMOTE_ADDR; --
  
   ?
  
   I can only seem to get the last line to display the
 correct value.
   It's as if I can't seem to get/return any of the SERVER
 environment
   variables
  using
   the getenv() function
  
   I'm using Apache 2.0.40, PHP 4.2.2 on Linux RedHat 8.0.
  
   I've checked through the PHP.INI file, but couldn't seem to
  find why
   this might be occuring. Any help/assistance would be
  appreciated.
  
   thanks
  
   bruce
   [EMAIL PROTECTED]
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


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


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



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