[PHP] browscap.ini

2001-03-27 Thread Joseph Blythe

Hey all,

I know you do not want to hear this question but after reading the list 
archives and doing extensive searches with google I have a really large 
internet headache, so here we go:

Where do I get a browscap.ini file that is current and will work in Linux?

The one suggested in the manual doesn't seem do work properly, it only 
outputs 2 lines under ie5.5:

browser_name_pattern: blah blah
parent: gobbely gook ascii

I found another but it parse errors for no apparent reason.

What is the deal? Any tips regarding detecting browser capabilties would 
be great (mainly js and cookies)

Any help always appreciated,

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] socket functions

2001-04-02 Thread Joseph Blythe

hello,

does anyone know if set_nonblock() works, what paramaters it takes and 
what it returns?

there is only one mention of it in the manual under accept_connect, and 
I can not seem to  set the socket to non block??

also has anybody successfully written a way to time out a read with the 
new socket fuctions I can not get this to work eithier.

any help would be appreciated,

regards,

joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Attention Adelaide Developers

2002-03-19 Thread Joseph Blythe

Hello all,

I am requesting expressions of interest from developers in Adelaide South
Australia who are available to do short term contract work skills required
are:

Dreamweaver/Fireworks
HTML
PHP/PEAR
Smarty template engine
mySQL
Linux an advantage

If you have a high level of experience in the above areas and live in
Adelaide South Australia, please send resumes, relevant experience and
contact details to:

mailto:[EMAIL PROTECTED]


Please do not reply on this list!


Regards,

Joseph Blythe
Production Manager

Optcom
49a Orsmond Street
Hindmarsh SA 5007
P: (08) 8346 3311
F: (08) 8346 3699

Making IT Easy




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




[PHP] re: Zend Cache cache_gui

2001-09-24 Thread Joseph Blythe

Hello all,

I just installed Zend LaunchPad (PHP 4.0.4pl1) with Zend Cache v1.1.0 all
seems ok when I run phpinfo()

This program makes use of the Zend scripting language engine:
Zend Engine v1.0.4, Copyright (c) 1998-2000 Zend Technologies
with Zend Optimizer v1.0.0, Copyright (c) 1998-2000, by Zend
Technologies
with Zend Cache v1.1.0, Copyright (c) 1999-2001, by Zend Technologies

But when I try and use Cache GUI it says that zend cache not loaded when
clearly it seems it has been by the phpinfo script, there are no messages in
apache's error logs relating to php either, I was wondering if anyone else
has had simular problems, or could point me somewhere to find out what is
going on?

Any help would be much appreciated.


Regards,

Joseph.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Zend Cache cache_gui

2001-09-25 Thread Joseph Blythe

unfortunatly ZendLaunchPad installed php-4.0.4pl1 with Zend Optimizer 1.0.0
built in static, unless I can figure out how to get LaunchPad working with
4.0.6, will have to scrap it and go back to manually setting it all up.

Thanks,

Joseph

-Original Message-
From: John Lim [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 26 September 2001 2:24 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Zend Cache  cache_gui


I had that problem. Appeared to be some incompatibility with Zend Optimizer
and Zend Cache. Upgrade to Zend Optimizer 1.1.0 and everything worked.

Regards, John


Joseph Blythe [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello all,

 I just installed Zend LaunchPad (PHP 4.0.4pl1) with Zend Cache v1.1.0 all
 seems ok when I run phpinfo()

 This program makes use of the Zend scripting language engine:
 Zend Engine v1.0.4, Copyright (c) 1998-2000 Zend Technologies
 with Zend Optimizer v1.0.0, Copyright (c) 1998-2000, by Zend
 Technologies
 with Zend Cache v1.1.0, Copyright (c) 1999-2001, by Zend Technologies

 But when I try and use Cache GUI it says that zend cache not loaded when
 clearly it seems it has been by the phpinfo script, there are no messages
in
 apache's error logs relating to php either, I was wondering if anyone else
 has had simular problems, or could point me somewhere to find out what is
 going on?

 Any help would be much appreciated.


 Regards,

 Joseph.






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] host type if you use --no-verify whattha?

2001-09-26 Thread Joseph Blythe

Hello all,

I just come across this rather strange error while trying to configure up
4.0.6 under redhat 6.0, it is strange because i have installed it many times
before with no problems, have deleted source tree and started again too!
here is the error:

ltconfig: you must specify a host type if you use `--no-verify'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed

here is my configure command:

./configure \
--prefix=/usr/local/Zend \
--with-apxs=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/Zend/etc \
--with-mysql=../../mysql \
--with-gd=/usr/local/gd \
--with-freetype-dir=/usr/local/freetype2 \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-zlib-dir=/usr \
--with-xml \
--with-pdf \
--enable-wddx \
--enable-sockets \
--enable-track-vars \
--disable-debug

don't see what the problem is whats this --no-verify didn't tell it to do
that :)

hope someone can help, as i'm stummped for now. also any suggestions on the
configuration options would also appreciated.

regards

joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php + pgp (gnupg)

2001-10-18 Thread Joseph Blythe

ive done this b4 but havn't got the scripts here they at home (can't
remember the exact command line, but from memory was a little fiddly), if
you have any problems send a email to [EMAIL PROTECTED] over the weekend
and i will gladly try and dig up an example for you.

regards

joseph

-Original Message-
From: Kasper [mailto:[EMAIL PROTECTED]]
Sent: Friday, 19 October 2001 8:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php + pgp (gnupg)


Can i decrypt files with pgp (gnupg) with php scripts?

If i can, does anybody have an example or 2?

Thanx
/Kasper



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Enabling php in only certain hosts and directories

2001-10-24 Thread Joseph Blythe

Hello all,

I am just configuring up a new web server, and I want to be able to run php
only in the web servers main document root and in specified virtual hosts, I
have a fair understanding on how to go about this, but would really like
some feedback before I get to far into it. Basically the only directories I
don't want to be able to use php are all the user directories (/~username)
unless they have been mapped to a virtual host that has the right directives
in them to enable php.

BTW: Running Apache/1.3.22, PHP/4.0.6, RedHat 6.2

Any feedback would be greatly appreciated,

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Enabling php in only certain hosts and directories

2001-10-24 Thread Joseph Blythe

Thanks! What would people reccommend?

1) just using safe mode

2) using open_basedir and disable_functions

3) all of the above?

4) Just shutoff the server :)

If (2) or (3) what functions are most at risk? I understand that safe_mode
limits quite a few already.

Regards,

Joseph

-Original Message-
From: Tamas Arpad [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 24 October 2001 11:01 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Enabling php in only certain hosts and directories


On Wednesday 24 October 2001 08:19, you wrote:
 Well, php runs the same as apache, so whatever apache can access,
 php can access.
 So any files with the db passwords that need to be accessed by php,
 can be seen by all users who can upload php scripts to your server.
That's not completely true. You can use open_basedir, safe_mode
settings in apache's configuration, based on virtualhosts or even
directories. This way you can restrict users, virtual hosts to their
own directories.
Arpi

  Hello all,
 
  I am just configuring up a new web server, and I want to be able
  to run php only in the web servers main document root and in
  specified virtual hosts, I have a fair understanding on how to go
  about this, but would really like some feedback before I get to
  far into it. Basically the only directories I don't want to be
  able to use php are all the user directories (/~username) unless
  they have been mapped to a virtual host that has the right
  directives in them to enable php.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] disable_functions not working in httpd.conf

2001-10-25 Thread Joseph Blythe

Hey All,

Was just trying the following and disable_functions is not working? Although
safe mode and open_basedir are! What is really strange that when phpinfo is
called the disable_functions value is phpinfo, can't seem to disable echo
either, I don't want to put these in php.ini as I still want to be able to
have a fully fledged php running from the main document root.

VirtualHost *
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /home/test/public_html
ServerName test.foo.bar.com.au
ErrorLog logs/test.foo.bar.com.au-error_log
CustomLog logs/test.foo.bar.com.au-access_log common
  Directory /home/test/public_html
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
php_admin_value open_basedir /home/test/public_html
php_admin_value user_dir /home/test/public_html
php_admin_value disable_functions phpinfo
php_admin_flag safe_mode On
php_admin_value safe_mode_allowed_env_vars PHP_
php_admin_value safe_mode_protected_env_vars LD_LIBRARY_PATH
php_admin_value sendmail_from [EMAIL PROTECTED]
  /Directory
/VirtualHost

What am I doing wrong, any suggestions welcome on the above conf too :)

Thanks in advance,

Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] editor for working with php

2001-10-25 Thread Joseph Blythe

active states komodo (www.activestate.com) or ZendIDE 2 (www.zend.com) I
have used both and are really good as you can debug both local and remote
scripts both are commercial though, komodo is free for non-commercial use. I
believe you can beta test them both (ZendIDE2 requires you to be ZPal) :)

-Original Message-
From: Ray Todd Stevens [mailto:[EMAIL PROTECTED]]
Sent: Friday, 26 October 2001 1:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] editor for working with php


I ahve been using go-live (4.0) to edit pages containing php scripts.
this is not really working well.  Is there a better way or a better editor
to use for this?

Ray Todd Stevens Specialists in Network and Security
Consulting
Senior ConsultantSoftware audit service available
Stevens Services
Suite 21
3754 Old State Rd 37 N
Bedford, IN 47421
(812) 279-9394
[EMAIL PROTECTED]

Thought for the day:
Bagpipes (n): an octopus wearing a kilt.


For PGP public key send message with subject
please send PGP key

If this message refers to an attachment the attachment
may arrive as a seperate mail message depending on the
type of mail client and gateway software you are using.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] security

2001-10-25 Thread Joseph Blythe

just stummbled across this great study by Shaun Clowes on php security, this
is just the kind of information I have been looking for, thought others
could also benefit from it.

http://www.securereality.com.au/studyinscarlet.txt

found during google search: PHP Security

cheers,

joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] security

2001-10-26 Thread Joseph Blythe

ok thanks, think I fall in that category too, but doing my best to change it
:)

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Friday, 26 October 2001 4:05 PM
To: Joseph Blythe
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] security


Has been around for quite a while and pretty much all the points are
address right in the PHP documentation at http://php.net/security which is
a much more informed source to study.  The guy who wrote that scarlet
report only had a very thin grasp of the concepts.

-Rasmus

On Fri, 26 Oct 2001, Joseph Blythe wrote:

 just stummbled across this great study by Shaun Clowes on php security,
this
 is just the kind of information I have been looking for, thought others
 could also benefit from it.

 http://www.securereality.com.au/studyinscarlet.txt

 found during google search: PHP Security

 cheers,

 joseph





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] What is the best way to do this...

2001-10-26 Thread Joseph Blythe

Personally I would look at a templating system, there are lots of them
around. I have only used FastTemplates and Smarty I would reccommend the
later.

http://www.phpinsider.com/php/code/Smarty/

or have a look at for a few more:

http://phpclasses.upperdesign.com/browse.html/class/1

Hope this helps,

Joseph

-Original Message-
From: DeloX [mailto:[EMAIL PROTECTED]]
Sent: Friday, 26 October 2001 4:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP] What is the best way to do this...


Let s say i have 5 pages on my site. I want some content to appear on each
page so that when i want to change that content on all the pages i have only
one place to modify. I used to write that content in a .txt file and having
it read each time any of the 5 pages was loaded. So i had to modify the code
only in the .txt file. It was working good but the code in the .txt file
could not be PHP because it would not be processed when loaded by the other
pages. There s probably a better way of doing it. Like a page can probably
include another page that itself include another one.

Any help would be great
Thx



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] lesson in NOT how to run your php website ...

2001-10-29 Thread Joseph Blythe

Sorry if this a little of topic but this sort of reminds me what happend to
me on Monday:

I arrived at work in a really good mood (for a Monday) to find everyone
screaming at each other, then at me :) what was being said is that the new
webserver I have been configuring with the latest versions of Apache, mySQL
and PHP had been serverley hacked and it was all my fault (as usual), I
thought this was rather strange as there really arn't any holes that would
allow a root exploit (as far as I know) in the software which I had
installed. After further investigation it seems that our IT manager who did
the Linux install had not latched down the FTP tight enough and some guy
from France (Yes we are on to you :)) got in and started to extract all his
little hacking toys, one of which was a network sniffer which revealed all
of my passwords as I continued to configure the server. After much pain
stakingly changing all of our passwords everything seems to be ok now.

Just thought it was kind of funny that they blammed the web developer first
as I am the one who uses all the weird arsed software :)


Regards,


Joseph

-Original Message-
From: brendan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 30 October 2001 2:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP] lesson in NOT how to run your php website ...


I teach law at a university  .. I also run the website here ...  php
with a mysql backend ...


- I have been designing a client side administration tool which allows
you to setup both the html input form to request from a database and
format the way the results look and are returned ... so that academics
can setup and run their own databases ...

- of course during setup and debugging I ran from the /temp directory of
the website (we dont have a test machine)

- after debugging was over i forgot about the extra copy of this script
in the /temp directory and forgot to delete it ..(there was no security
on the script)

- what i also forgot was that in my last lecture series I had left the
presentation files for the students in the .. you guessed it ... /temp
directory  ..

- the students .. being students didnt actually look at the lecture
notes very much, and i had deleted them ..

- however its exam time  ... and all of them in a flurry logged on to
the site ('/temp') ... but instead of finding the lecture series they
find this strange control panel with lots of weird buttons...
- web user + strange buttons on page = bugger ...

so about two weeks ago the site started to go haywire ... links stopped
working .. databases started screwing up ..

- i had entirely forgot about the contents of the /temp directory ..
- i was going INSANE trying to continually fix the site ..
- i thought we were being hacked and ran a constant netstat, logged all
visitor activity and made two separate complaints about what seems now
were innocent web users ...
- i didnt sleep
- my girlfriend nearly dumped me ..
- i was sure there was a conspiracy at hand ..

- I only stumbled on the /temp directory when i began rebuilding a new
site to replace what I had now decided was a comprimised code base ... I
started in the /temp directory of course ;)


- I am sure there is a lesson here somewhere .. I think it is probably
more valuable just to laugh at ..

ps thanks for all the help on the last run of stupidity I had (re
!#@$!#$ regular expressions posts here)

happy programming!


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Searchengine friendly URLs

2001-10-30 Thread Joseph Blythe

Not sure if you have seen this, it has been around for a while:

http://www.phpbuilder.com/columns/tim2526.php3

Regards,

Joseph

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 27 October 2001 3:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Searchengine friendly URLs


Hi there,

I heared that search engines are not following things after the question
mark. Now I looked arround and noticed, that some sites yust have numbers
behind the .php extension. How does this work? Can anybody make an example
and list advantages and disadvantages?

Thanx,

Andy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: I rest my case

2001-10-30 Thread Joseph Blythe

Um! could they be commented out still?

#  AddType application/x-httpd-php .php4 .php3 .phtml .php
#  AddType application/x-httpd-php-source .phps

Make sure you remove the hash signs whatever they called :)

  AddType application/x-httpd-php .php4 .php3 .phtml .php
  AddType application/x-httpd-php-source .phps

Just a thought!

Joseph

-Original Message-
From: J W W L (Warwick) Berg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 31 October 2001 3:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: I rest my case


Hey thanks guys for the help, but it's still not happening. Apache had 
already the AddType lines mentioned by y'all.

Any other ideas?

Thanks
Warwick




J W W L Berg wrote:

 Hi all
 
 Sorry about what is probably a total dickhead about to enter your midst,
 but I've never installed php or seen it much at all before but am trying
 to do it now.
 
 Using RH 7.1 and Apache 1.3.19
 
 Want to install php4 and mysql combo and totally ignorant.
 
 Installed php rpm.
 
 Restarted apache in case that was needed.
 
 made hello.php  and pointed browser at it.
 
 Got the text, rather than executing it.
 
 Can I surmise that apache isn't set up properly, and if so, could someone
 please point me towards relevant assistance. Got really confused with the
 manual, etc. Not that bright I suppose ;-)
 
 Thanks in advance
 Warwick
 
 
 
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Posting variables to a cgi without a form

2001-11-04 Thread Joseph Blythe

Hey all,

What is the best wat to post some variables to a cgi file and capture the
output so I may strip out all the html tags, I want to replace a forms
action with a php script which will mimic a forms post method, allowing me
to better format the response, as at the moment the cgi is written in c and
creates a whole html page which i need to strip back down to text before I
can include it in my site.

I know about the string and filesysytem functions, sort of looking for a
quick example of passing the variables to the cgi and capturing the output.

Any help much appreciated,


Regards,


Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Posting variables to a cgi without a form

2001-11-04 Thread Joseph Blythe

Thanks,

I got to recompile php to do this (me too lazy), can't I do this with the
network/filesystem functions? will keep this in mind though.

Regards,

Joseph

-Original Message-
From: Jason G. [mailto:[EMAIL PROTECTED]]
Sent: Monday, 5 November 2001 4:14 PM
To: Joseph Blythe
Subject: Re: [PHP] Posting variables to a cgi without a form


I believe cURL is great at this.  Php supports cURL.  go to curl.haxx.se

-Jason Garber
IoNZoft.com

At 03:40 PM 11/5/2001 +1030, you wrote:
Hey all,

What is the best wat to post some variables to a cgi file and capture the
output so I may strip out all the html tags, I want to replace a forms
action with a php script which will mimic a forms post method, allowing me
to better format the response, as at the moment the cgi is written in c and
creates a whole html page which i need to strip back down to text before I
can include it in my site.

I know about the string and filesysytem functions, sort of looking for a
quick example of passing the variables to the cgi and capturing the output.

Any help much appreciated,


Regards,


Joseph



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] usage stats

2001-11-22 Thread Joseph Blythe

G'day all,

I am putting together a small piece on php and was wondering if anyone knew
how to dynamically generate the php usage stats from:
http://www.netcraft.com/Survey/

Sort of want something like:

http://www.php.net/usage.php

Have looked at the source looks like this is manually updated? Thought there
may be some way of grabbing the stats and generate my own graph with gd or
something?

Any ideas?

Regards,


Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Missing PHP.ini

2001-11-22 Thread Joseph Blythe

John,

Look in the original distribution files for php.ini-dist (or
php.ini-optimized) and copy it to c:\windows\php.ini

As far as I know php can run without a php.ini I beleive it has builtin
defaults.

Regards,

Joseph

-Original Message-
From: John Monfort [mailto:[EMAIL PROTECTED]]
Sent: Friday, 23 November 2001 12:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Missing PHP.ini




 Hello everyone!

 I upgraded my system from win98 to win2k, a few weeks ago.
 Now,  I can't seem to locate my php.ini file.

 I've looked in
  C:\
  C:\windows
  C:\windows\system (and system32)

  to no success.

 Is anyone aware of what may have happened?
 I was under the impression that PHP could NOT run without the Php.ini
 file, is that incorrect?

 Please help.

 -john

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] strip php out of html

2001-11-22 Thread Joseph Blythe

Hello,

Is there a way to strip only php code out of an html file? I know about
strip_tags but its going to be alot of work to make the allowable list, as
all I want to strip out is:

?php ... ?

I tried like so:

eregi_replace (?php include(\whatever.php\); ?, , $string);

but it didn't find it suppose because of the escape characters...

Another option would be to find the php code evaluate it and then put the
result back in the correct position, I sort of tried this with not much
luck.

Any ideas..

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] strip php out of html

2001-11-22 Thread Joseph Blythe

David,

Basically I have found a way of making printable versions of every page in a
website I am currently working on (without a database etc), because I am
using a dreamweaver template the main content is always surrounded by:

!-- #BeginEditable content --
...
!-- #EndEditable --

Just a link on a page pointing at the script below:

-- html --
?php
$file = fopen($HTTP_REFERER, r);
if(!$file)die(Cannot open the file.);
$readfile = fread($file ,4);
$searchfile = eregi(!-- #BeginEditable \content\ --(.*)!--
#EndEditable --, $readfile ,$out);

echo $out[0];
?
-- html --

My problem is that there is a bit of php code showing in the source view
which gives away some of my included files names which I really don't want
people seeing, especially clever  people like the ones on this list :) I
don't need the php in the printable version so if I can either eval it or
strip it out that would be nice.

Regards,


Joseph

-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Friday, 23 November 2001 2:28 PM
To: Joseph Blythe; [EMAIL PROTECTED]
Subject: Re: [PHP] strip php out of html


On Fri, 23 Nov 2001 14:10, Joseph Blythe wrote:
 Hello,

 Is there a way to strip only php code out of an html file? I know about
 strip_tags but its going to be alot of work to make the allowable list,
 as all I want to strip out is:

 ?php ... ?

 I tried like so:

 eregi_replace (?php include(\whatever.php\); ?, , $string);

 but it didn't find it suppose because of the escape characters...

 Another option would be to find the php code evaluate it and then put
 the result back in the correct position, I sort of tried this with not
 much luck.

 Any ideas..

 Regards,

 Joseph

It sounds like you want to capture the output of the script - so you just
end up with what you would see in View Source???

Is this a one off thing, or what exactly is the problem you are trying to
solve?

--
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

   Always draw your curves, then plot the data.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] strip php out of html

2001-11-22 Thread Joseph Blythe

Sorry people it is actually evaluating the code I was looking at it from
inside Maguma PHP4EE studios internal preview which was not evaluating it,
after uploading it to the webserver it now is ok doh! :)

Anyway i do need to strip out the original link that points to the printable
script so that people don't click on it and point it at its self, it just
comes up blank anyway as it does not use the dreamwaever template.

Regards,

Joseph

-Original Message-
From: Joseph Blythe [mailto:[EMAIL PROTECTED]]
Sent: Friday, 23 November 2001 2:47 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] strip php out of html


David,

Basically I have found a way of making printable versions of every page in a
website I am currently working on (without a database etc), because I am
using a dreamweaver template the main content is always surrounded by:

!-- #BeginEditable content --
...
!-- #EndEditable --

Just a link on a page pointing at the script below:

-- html --
?php
$file = fopen($HTTP_REFERER, r);
if(!$file)die(Cannot open the file.);
$readfile = fread($file ,4);
$searchfile = eregi(!-- #BeginEditable \content\ --(.*)!--
#EndEditable --, $readfile ,$out);

echo $out[0];
?
-- html --

My problem is that there is a bit of php code showing in the source view
which gives away some of my included files names which I really don't want
people seeing, especially clever  people like the ones on this list :) I
don't need the php in the printable version so if I can either eval it or
strip it out that would be nice.

Regards,


Joseph

-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Friday, 23 November 2001 2:28 PM
To: Joseph Blythe; [EMAIL PROTECTED]
Subject: Re: [PHP] strip php out of html


On Fri, 23 Nov 2001 14:10, Joseph Blythe wrote:
 Hello,

 Is there a way to strip only php code out of an html file? I know about
 strip_tags but its going to be alot of work to make the allowable list,
 as all I want to strip out is:

 ?php ... ?

 I tried like so:

 eregi_replace (?php include(\whatever.php\); ?, , $string);

 but it didn't find it suppose because of the escape characters...

 Another option would be to find the php code evaluate it and then put
 the result back in the correct position, I sort of tried this with not
 much luck.

 Any ideas..

 Regards,

 Joseph

It sounds like you want to capture the output of the script - so you just
end up with what you would see in View Source???

Is this a one off thing, or what exactly is the problem you are trying to
solve?

--
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

   Always draw your curves, then plot the data.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] GD, PNG

2001-11-22 Thread Joseph Blythe

Two things come to mind when compiling under redhat 6.x

1) Delete all headers and libs relating to gd in /usr/lib and /usr/include
these are old and will cause conflicts.

2) Use --with-..-dir=..

Here is my successful configure command assuming you have successfully
installed freetype2 and gd with frretype2 support. redhat comes with
compatible zlib, png and jpeg libs

./configure \
--prefix=/usr/local/Zend \
--with-apxs=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/Zend/etc \
--with-mysql=../../mysql \
--with-gd=/usr/local/gd \
--with-freetype-dir=/usr/local/freetype2 \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-zlib-dir=/usr \
--with-xml \
--with-pdf \
--enable-wddx \
--enable-sockets \
--enable-track-vars \
--disable-debug

Hope this helps some as I too had major troubles geeting gd support under
php seems to work really well now though.

Regards,

Joseph

-Original Message-
From: Yamin Prabudy [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 24 November 2001 4:46 AM
To: Michael A. Peters; PHP
Subject: Re: [PHP] GD, PNG


I try to compile againts PNG and JPEG and for web inteface

i had install zlib
and png and jpeg
then gd
but still have no  sucess on it


On Thursday 22 November 2001 09:03, you wrote:
 The operating system you are using would be nice to know- and wether its
 for apache, cgi-bin, or whatever.

 Most unixes (and it looks like you got a unix) have zlib in /usr not
 /usr/local.
 Quite a few already have gd and libpng in /usr as well.

 That's why it would be nice to know what your build environment is.

 Anyway, I'm pretty sure that you need to make sure gd is compiled against
 png.

 On my system, for example, my gd library is compiled with png, jpeg, and
 FreeType2 support.
 Secondly- if your system is darwin, you need to fix a few things.

 First, run ranlib on /usr/local/lib/libpng.a

 Then you can build gd against it.
 Then, though, you need to do the same to libgd

 ranlib /usr/local/lib/libgd.a

 note that the above is only needed on Darwin.
 That is properly done on most other unixes for you (in fact, most unixes
 compile those as shared libraries)



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] GD, PNG

2001-11-25 Thread Joseph Blythe

thats right just untar somewhere, when you do the make install it should
create the directory /usr/local/freetype2 for you, it is a bit of a strange
one they also made it to use jam which is another make file system, I don't
know whats wrong with the old ./configure, make, make install at least it is
a standard :)

Good luck with the install.

Regards,

Joseph

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, 26 November 2001 9:11 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] GD, PNG


Interesting. Thanks

So after untar, I will use that sequence you typed

I presume I can untar and do that
or need to rename folder to freetype 2
go in, and then the process you stated?

It's funny how freetype throws me off but I am confident
in installing gd and everything else. It's like the sun
, without it, everything else falls apart

Thanks
Joel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] `pwd` - what does this mean?

2001-08-15 Thread Joseph Blythe

how about typing man pwd on a unix box?

-Original Message-
From: Scott Mebberson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 August 2001 4:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] `pwd` - what does this mean?


Hi Guys,

I actually know what it means. Well, I think it means the current directory?
Anyway... what exactly is it and where can I find some more information
about it? I couldn't find much on php.net - also, is there any other
ones(whatever it is) like this?

Thanks.

Scott.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: `pwd` - what does this mean?

2001-08-15 Thread Joseph Blythe

actually says: pwd - print name of current/working directory in the man
page (c:

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 August 2001 4:18 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: `pwd` - what does this mean?


pass working directory [or] path to working directory.

PWD is a unix command

See man pwd for more details.

eg

http://campuscgi.princeton.edu/man?pwd#toc3


-Original Message-
From: Raphael Pirker [mailto:[EMAIL PROTECTED]]
Sent: August 15, 2001 2:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: `pwd` - what does this mean?


my guess would be Parent Working Directory, but i'm not sure...



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Grabbing dynamic pages

2001-09-06 Thread Joseph Blythe

Thanks all (c:

 Why don't they make this available via XML?  Parsing HTML is painful.

Was my exact question to them (c:

 That just shows a chart.  How are you supposed to parse anything out of
 that?

Hehe I provided the wrong url should something like:

http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/CompanyInfoSearch
Results.jsp?searchBy=asxCodeallinfo=onasxCode=asxcompanyName=principalAc
tivity=industryGroup=0

I tried it as suggested heres the output:

Warning: php_hostconnect: connect failed in /home/asx/public_html/index.php
on line 9

Warning:
fopen(http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/CompanyInf
oSearchResults.jsp?searchBy=asxCodeallinfo=onasxCode=asxcompanyName=prin
cipalActivity=industryGroup=0,r) - Bad file descriptor in
/home/asx/public_html/index.php on line 9

Trust them to make it as hard as possible using Java Slowdown Pages :-))

Will keep trying.

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Grabbing dynamic pages

2001-09-06 Thread Joseph Blythe

hmm just tried exact code still same error, I am going to have to have a
little talk to our internet manager as he has done some pretty nasty stuff
to our border. what i do find starnge is no errors are produced when I
exclude all the query stuff eg:

$fp = fopen(http://www.asx.com.au,r;);

Thanks again,

Joseph

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 September 2001 3:18 PM
To: Joseph Blythe
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Grabbing dynamic pages

This script worked fine for me here:

?
$fp =
fopen(http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/CompanyInf
oSearchResults.jsp?searchBy=asxCodeallinfo=onasxCode=asxcompanyName=prin
cipalActivity=industryGroup=0,r);
while(!feof($fp)) echo fgets($fp,1024);
fclose($fp);
?

Firewall in the way perhaps?

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Grabbing dynamic pages

2001-09-06 Thread Joseph Blythe

This is true this is exactly why i try and find a solution here first (with
PHP), my bosses attitude was to hire java programmers i said 'why?'.

I also noticed getss which strips stuff on the read which is kinda cool too
(c:

Joseph

-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 September 2001 3:02 PM
To: Joseph Blythe; [EMAIL PROTECTED]
Subject: Re: [PHP] Grabbing dynamic pages


On Fri,  7 Sep 2001 14:44, Joseph Blythe wrote:
 Hey all,

 I got a bit of a problem I need to be able to grab info (which has been
 approved) from the Australian Stock Exchange Website (www.asx.com.au)
 all they say about this in the information they sent me is:

 To obtain your share price data you will need to get your IT
 department to write a java object or a com active x object to strip out
 the unnecessary html so that you are just left with your share price
 information.

 LOL I am the IT department (well part of it) and I don't use or would
 even recommend using these products not that there is anything wrong
 with them, furthermore even if I did this does not help me very much
 (c:

 I was sort of wondering if there is a way to do this sort of thing with
 PHP? the only other information I have is the URL in the form of:

 http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/chartsSearch
.jsp? searchBy=asxCodeTimeFrame=DasxCode=ASX

 I tried a quick test using the filesystem functions with no success, I
 was sort of hoping for a 'Yes' / 'No answer maybe if 'Yes' just a
 quick explanation.

 Any help would be much much appreciated.

 Regards,

 Joseph Blythe
 Web Development

Seems like PHP has something to do just about anything; in this case you
may find striptags is just the bee's knees.

--
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

   Real Programmers aren't afraid to use GOTO's.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Grabbing dynamic pages

2001-09-07 Thread Joseph Blythe

thanks again all,

The data will be the whole web page and I have to extract out the current
share pricing etc, probaly grab thier sexy chart as well (was told you can
take what you want as long as you use thier guidlines which they provide
apon contact) I suppose I could use imlib or gd to generate my own graphs as
well joy (c:

I was told by our Internet manager that the problem does lies in our
protection on our border ie: firewall, once he has allowed me some access to
the outside world I should be able to do this :-) I'm sure I will have
plenty of questions when it comes time to parse the html (oh my god).

Regards

Joseph

-Original Message-
From: Donny Yap [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 September 2001 4:55 PM
To: Joseph Blythe
Subject: RE: [PHP] Grabbing dynamic pages


Yes,

This shouldn't be too hard to do; work out what type of data it is you're
grabbing from the ASX site - ie. is it just that image, or is there a form
or something?

You can open the page directly in PHP using fopen,
Regexp will let you grab out whatever the data is...
An alternative is to use strip_tags

Hope that helps some,
Donny


 -Original Message-
 From: Joseph Blythe [mailto:[EMAIL PROTECTED]]
 Sent: Friday, 7 September 2001 3:14 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Grabbing dynamic pages


 Hey all,

 I got a bit of a problem I need to be able to grab info (which has been
 approved) from the Australian Stock Exchange Website (www.asx.com.au) all
 they say about this in the information they sent me is:

 To obtain your share price data you will need to get your IT department
 to write a java object or a com active x object to strip out the
 unnecessary
 html so that you are just left with your share price information.

 LOL I am the IT department (well part of it) and I don't use or would even
 recommend using these products not that there is anything wrong with them,
 furthermore even if I did this does not help me very much (c:

 I was sort of wondering if there is a way to do this sort of
 thing with PHP?
 the only other information I have is the URL in the form of:

 http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/chartsS
 earch.jsp?
 searchBy=asxCodeTimeFrame=DasxCode=ASX

 I tried a quick test using the filesystem functions with no success, I was
 sort of hoping for a 'Yes' / 'No answer maybe if 'Yes' just a quick
 explanation.

 Any help would be much much appreciated.

 Regards,

 Joseph Blythe
 Web Development

 BoldFX / Binary Logic
 The LOGICAL Choice!
 750 Port Road Beverley
 Phone: +61 08 8244 1800
 Fax: +61 08 8244 1811
 mailto:[EMAIL PROTECTED]






 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Just for fun:

2001-09-20 Thread Joseph Blythe


When you find yourself writing HUGE functions, it may be better to split it
into smaller, more clearly defined functions or classes and do it that
way...

I totally agree i tend to split my class functions into user (public) and
private (helper) functions which does tend to keep all the functions nice
and compact the user functions usually just combine a number of the helper
functions together, don't know if this the best way but works for me (c:

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] OT States and Postcodes

2001-05-09 Thread Joseph Blythe

Hey all,

I have a signup form that a drop down list of country states, what I 
want to be able to do is when a user clicks his/her state the page will 
refresh and fill the below postcodes in with the approprite codes for 
the particular state, once a user has selected a postcode the page will 
refresh again and fill in the appropriate city/town, of course I will 
just default it to the first state in the list. I already have all the 
required data to do this for Australia.

I have the page refresh working with a onChange event on the select tag, 
but I cannot get the list to stay on the value that has been selected 
before the page was refreshed. Also how will I pass this information to 
php so that I can get the selected state without posting the form?

Has anyone done this before or can give me some clues on how to go about 
this, please just don't say 'javascript' as I have already searched alot 
of script archives but could only find jumpto menus etc.

I would really only like to use javascript to refresh the page onChange, 
and do all the selected stuff with php if possible.

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] finding a variables name

2001-05-14 Thread Joseph Blythe

Hey ppl,

How does one find the name of a variable, not what the variable contains?

This is not the same as variable variables.

I know this seems a bit pointless but I have come across a situation 
where I really need to be able to do this.

Hope someone can help,

Thanks,

Joseph






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] finding a variables name

2001-05-14 Thread Joseph Blythe

CC Zona wrote:

 Can you give an example of code in which you'd be doing this?

Ok here is what I am trying to acheive, basically turning a php array 
into a javascript array, note this is untested and most likley won't 
work :-)

Where $array_name I need the same name as the functions first and only 
argument $array, so I need the name of the array that has been passed to 
the function.

///

function makeJSArray($array) {

   $out = $array_name = new Array(;

   $size = sizeof($array);
   $i = 0;
   while ( list($key, $val) = each($array) ) {

   $out .= $array_name[$key] = $val;

   if ($size != $i - 1)
   $out .= ,;
   }

   $out .= );;
   return $out;
}

/

Thanks,

Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] finding a variables name

2001-05-14 Thread Joseph Blythe

Joseph Blythe wrote:

 Ok here is what I am trying to acheive, basically turning a php array  
 into a javascript array, note this is untested and most likley won't  
 work :-)
 
 Where $array_name I need the same name as the functions first and only 
 argument $array, so I need the name of the array that has been passed 
 to the function.
 
 ///
 
 function makeJSArray($array) {
 
   $out = $array_name = new Array(;
 
   $size = sizeof($array);
   $i = 0;
   while ( list($key, $val) = each($array) ) {
 
   $out .= $array_name[$key] = $val;
 
   if ($size != $i - 1)
   $out .= ,;
   }
 
   $out .= );;
   return $out;
 }
 
 /
 
 Thanks,
 
 Joseph

He he, would also help if I closed my while loop and added the increment 
for $i


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Chained Selectors

2001-05-16 Thread Joseph Blythe

Hello,

Has anyone used/is using the most excellent chainedSelectors class (by 
Leon Atkinson) available as a tutorial from zend.com ?

I just got this working for use with the states of australia and its 
postcodes (around 3395 unique pcodes), but have found the result totally 
unusable due to the large amount of outputted javascript makes the page 
loading times totally unacceptable, around 40 seconds for 390k @ 56k, 
this is just for the outputted javascript,  two select form objects , 
the skeleton html file and of course a bit of sever side processing.

I would really appreciate a better solution as I really need this 
functionality, but believe such long waits on a eccomerce site is crazy, 
if any Australians are reading this and have done this kind of thing 
before could they please let me know how?

Thanks again,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Chained Selectors

2001-05-17 Thread Joseph Blythe

For an example of the speed of this in a semi-production enviroment 
checkout:

http://www.secure.binarylogic.com.au/~chained

Let me know your thoughts etc...

Oh and also check out the unknown error on line 12 hmm suspect...

Thanks,

Joseph





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Chained Selectors

2001-05-17 Thread Joseph Blythe

Joseph Blythe wrote:

 For an example of the speed of this in a semi-production enviroment  
 checkout:
 
 http://www.secure.binarylogic.com.au/~chained
 
 Let me know your thoughts etc...
 
 Oh and also check out the unknown error on line 12 hmm suspect...
 
 Thanks,
 
 Joseph

Doh!

http://secure.binarylogic.com.au/~chained




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Finding if a number is in the range

2001-05-17 Thread Joseph Blythe

hello,

How do I find if a number is in a range example:

0200-0299
1000-2263
2264-2499

Lets say I choose 203 how would find which number range it was in?

I was sort of thinking of using arrays of all the number ranges and 
using the in_array function to find which range the numbers are in, but 
this would take some time as there are around 3000+ numbers.

I do however have all the numbers in a database already but they are not 
categorized in ranges.

A better way?

Thanks

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PGP with MySQL

2001-05-17 Thread Joseph Blythe

Jeff wrote:

 I am trying to find the maximum security for storing credit card
 numbers.
 
 From reading the archives someone mentioned using a PGP based encryption
 to encrypt the credit card number and store it into the database, and
 have the company that is processing the order have the decryption key on
 the their computer.
 
 Any comments or different ideas on this system?

Jeff,

search of the php-general list archives for 'PGP' as I have been through 
this one and there are a few concerning issues. 

Regards,

Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Finding if a number is in the range

2001-05-17 Thread Joseph Blythe


MaD dUCK wrote:

 also sprach Zak Greant (on Thu, 17 May 2001 09:35:18PM -0600):
 
 Or just use a simple chain of if statements :)
 
 
 yeah, but that's so O(n) !
 i can do in O(lg n)
 or, given n CREW processors, in O(1) time!
 
 yes, i have just finished my computational theory and computer
 algorithms honors exam.

Smarty Pants :-)

I give these ideas a go unfortunately the ranges are not contiguous, 
they are all over the place.

Thanks.

Joseph





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PGP with MySQL

2001-05-21 Thread Joseph Blythe

Jeff Oien wrote:

 Jeff wrote:
 
 I am trying to find the maximum security for storing credit card
 numbers.
 
 From reading the archives someone mentioned using a PGP based encryption
 to encrypt the credit card number and store it into the database, and
 have the company that is processing the order have the decryption key on
 the their computer.
 
 Any comments or different ideas on this system?
 
 
 (I'm a different Jeff) I searched through the archives and couldn't find
 your message. I'm interested in this also. The PHP PGP tutorials
 all deal with sending e-mail using PGP. I would like to be able to do 
 this on the server to retrieve information from the server.
 Jeff Oien


Sorry for the confusion, but I actually was using gnuPG (the principles 
are the same) my mistake :-)

Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Encrypt Password for Session

2001-05-22 Thread Joseph Blythe


Troy Moreland wrote:

 If I can't decrypt it, then I can't pass that password for the
 user.  How do I keep passing the password then w/o having to write it to the
 session.  Is that the right way to do it??

I don't know if this is the right way but what I would do is have a 
login page that does the md5 databse lookup, if it is successful writes 
the users name to a variable to the current session, maybe $verified_user

Now every page tests for $verified_user you will know if they have 
logged in correctly, This approach seems to work very well for me, I 
don't know if there are any major security holes though?

example:

if ( isset($verified_user) ) {
$user = $verified_user;
} else {
$user = nobody;
}

Hope this helps, it is pretty simple really.

Regards

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] OT PHP Manuals

2001-05-22 Thread Joseph Blythe

Hey all,

Just was wondering if anyone knew what was used to make the php manuals 
in the windows help format (.chm), I really like them :-)

Regards,

Joseph.

-- 
BoldFX / Binary Logic
The Logical Choice
750 Port Road Beverley 5009
Ph: (08) 8244 1800 Fax: (08) 8244 1811
mailto: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] OT PHP Manuals

2001-05-22 Thread Joseph Blythe

Miles Thompson wrote:

 Why? We have the manuals in two truly portable formats, HTML and PDF, 
 not  to mention on-line, annotated HTML.
 Miles Thompson 

Because I already have enough browser windows open and I find the 
windows help format a lot better as it is easily searchable and also has 
bookmarks, as for PDF's they are good if you want to print.

I have quite a few html manuals I would like to convert for personal use 
I don't care about portability as I am the only one who will be reading 
them.

That is why :-)

Regards

Joseph.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] OT PHP Manuals

2001-05-22 Thread Joseph Blythe


Matt McClanahan wrote:

 On Wed, May 23, 2001 at 10:37:06AM +0930, Joseph Blythe wrote:
 
 Hey all,
 
 Just was wondering if anyone knew what was used to make the php manuals 
 in the windows help format (.chm), I really like them :-)
 
 
 The manual is availabe in chm in several languages.
 
 http://www.php.net/docs.php
 
 Matt

If you ask a silly question you get silly answers, so far I have a why 
and where to get the actual manual that I was trying to find out what 
software was used to make it.

LOL :-)

Joseph.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] OT PHP Manuals

2001-05-23 Thread Joseph Blythe


Jason Lotito wrote:

 Joseph,
 
 I was actually about to type back in response explaining to everyone
 that you asked WHAT was use to make the .chm files.  You must forgive my
 colleagues, they sometimes forget to actually read the email, rather
 than just scan the email for common key words and phrases signifying a
 newbie with a RTFM type question.
 
 While I don't know what was used to create the PHP .chm files, here is a
 listing of a set of freeware programs that can be used:
 
 http://www.webattack.com/freeware/webpublish/fwhtmlhelp.shtml
 
 I have not, however, used any personally.

Jason,

Thankyou very mutch for such a kind response, I think people see my name 
then just assume I am being daft ;-)

Regards,

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] OT PHP Manuals

2001-05-23 Thread Joseph Blythe

Miles Thompson wrote:

 My apologies to Joseph, and to the group at large.
 
 I didn't read his question carefully, and in retrospect, gave him a 
 pretty  asinine answer.
 
 Braaay! - Miles Thompson 


Thanks all this is a great list, apology accepted :-)

Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] setting session.gc_probability

2001-05-23 Thread Joseph Blythe

Johnson, Kirk wrote:

 I say that a value of 1 means garbage collection is launched on 1 out of
 every 100 page requests, i.e., it truly is a percent.

This has been discussed before try searching the list archives, although 
I believe you are correct in your assumption.

Regards,

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Virtual Hosts document root directory.

2001-05-23 Thread Joseph Blythe

Richard Quadling wrote:

 I assume there is a variable somewhere?
 
 Ideas/suggestions please.

I think its the predefined apache variable $DOCUMENT_ROOT (look under 
predefined variables in manual), or try $SCRIPT_FILENAME, you may then 
parse the part you need.

I use Linux so I am only guessing.

Hope this helps,

Regards

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] To overwrite or unregister session variables

2001-07-17 Thread Joseph Blythe

Hey,

Was just wondering if it was better practice to unregister session variables
before writing new values to them or if it was fine to just overwrite their
values?

Regards,

Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] WSIWYG Editor using PHP?

2001-07-24 Thread Joseph Blythe

Try PHP Coder Pro! http://www.phpide.de 

Regards,

Joseph.

-Original Message-
From: Bob Clingan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 25 July 2001 9:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] WSIWYG Editor using PHP?

Does anyone know of any WSIWYG editors that you can plug into a site using
PHP.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] WSIWYG Editor using PHP?

2001-07-24 Thread Joseph Blythe

What OS you running Linux? maybe look at http://php.weblogs.com/editors

-Original Message-
From: chip [mailto:chip]On Behalf Of Chip
Sent: Wednesday, 25 July 2001 12:57 PM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] WSIWYG Editor using PHP?

Joseph Blythe wrote:

 Try PHP Coder Pro! http://www.phpide.de

Too bad it's a winblows-only app.  :-(

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] komodo

2001-07-25 Thread Joseph Blythe

Hey,

Is anyone on this list using ActiveState's Komodo (http;//activestate.com)
on a windows box to remotely debug php scripts running on a linux server? Is
this possible? I have read the documents and don't get it at all! Although
local debugging under windows works just fine.

If you are using komodo under linux or windows would you please let me know
your findings as this looks slightly better (and alot faster) then the Zend
IDE.

Regards,

Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] WSIWYG Editor using PHP?

2001-07-25 Thread Joseph Blythe

You might want to look at Komodo (http://www.activestate.com) I just
downloaded the windblows version (there is also Linux version 25mb though)
which is a fairly basic text editor with php syntax highlighting (and a few
other neat fetures) with a built in debugger which can apparently debug
scripts remotely.

Regards,

Joseph

-Original Message-
From: chip [mailto:chip]On Behalf Of Chip
Sent: Wednesday, 25 July 2001 3:56 PM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] WSIWYG Editor using PHP?

I use FreeBSD. Thanks for the link, looks like Bluefish has made some big
improvements since I tried it over a year ago, same with Glimmer . Maybe
I'll take another look at those. I usually just use a text editor with
syntax highlighting, can't get a fancy gui editor to work nearly as fast as
that.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] WSIWYG Editor using PHP?

2001-07-25 Thread Joseph Blythe

sorry should be http://activestate.com

-Original Message-
From: Joseph Blythe [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 25 July 2001 4:25 PM
To: Chip
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] WSIWYG Editor using PHP?

You might want to look at Komodo (http://www.activestate.com) I just
downloaded the windblows version (there is also Linux version 25mb though)
which is a fairly basic text editor with php syntax highlighting (and a few
other neat fetures) with a built in debugger which can apparently debug
scripts remotely.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] socket functions

2001-04-03 Thread Joseph Blythe



Joseph Blythe wrote:

 hello,
 
 does anyone know if set_nonblock() works, what paramaters it takes 
 and  what it returns?
 
 there is only one mention of it in the manual under accept_connect, 
 and  I can not seem to  set the socket to non block??
 
 also has anybody successfully written a way to time out a read with 
 the  new socket fuctions I can not get this to work eithier.
 
 any help would be appreciated,
 
 regards,
 
 joseph

Well after no response from this list I can assume that this function is 
indeed dead, I had to go back to the generic network functions to get a 
non blocking socket to work and be able to wrap a loop around the socket 
read to time it out after so many seconds. If anyone knows any different 
please let me know.

Regards

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] UDDI

2001-04-03 Thread Joseph Blythe

Hey,

Is anyone using php and UDDI together, if so I would appreciate some 
comments, insights,  recommendations etc...

I really don't feel like selling my soul to Microsoft yet :-)

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] socket functions

2001-04-04 Thread Joseph Blythe

Yasuo Ohgaki wrote:

 Did you read the Manual?

The manual is my bible I always read it before I post. Also searched 
google and the list archives.

 socket_set_blocking

As far as I can tell this does not work for the new socket functions, 
the file descriptor does not seem to be compatible? (it returns an 
error) You have to use set_nonblocking() which doesn't seem to work.

 There is note that says it does not work with PHP4/Win32. I may need to check
 BugDB to find out status of this problem.

I am running linux so this should not matter.

Thanks for your reply,

Regards

Joseph





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHPSESSID sticks to every link after upgrate of Apache/PHP

2001-04-04 Thread Joseph Blythe



Maxim Maletsky wrote:

 
 Site uses sessions and, somehow, after this upgrade started carrying
 PHPSESSID through HREF.

Sounds to me like php was compliled with the --enable-trans-sid option 
which does exactly that.

Just a guess.

Regards

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] sockets (long)

2001-04-04 Thread Joseph Blythe

Hey all,

People who have been recieving this list for a while may remember me 
going through all this a while back, so I am not really a newbie when 
using sockets. I am basically trying to rewrite my Online Credit Card 
Verification (OCV) client with the new socket functions.

In thoery the following should work:

--- example1 socket functions 

$socket = socket(AF_INET, SOCK_STREAM, 0);
$conn = connect($socket, some_ip_address, some_port);
set_nonblock($socket);

$packet = "a  request";
write($socket, $packet, some_length);

$start = time();
$buffer = "";

while ( empty($buffer)  (time()  $start + 30 )) {
read($socket, $buffer, some_length);
}
This does not work will hang until the script times out (max execution 
time is exceeded).

- exampe 2 network and file system functions -

$socket = fsockopen (some_address, some_port, $errno, $errstr, 30);
set_socket_blocking($socket, 0);

$packet = "a request";
fputs ($socket, $packet);

$start = time();

while ( empty($buffer)  (time()  $start + 30 )) {
$buffer = fgets($socket, some_length);
}

Works! After 30 seconds fgets is timed out.

The lengths I am reading and writing are correct as all request and 
response lengths are pre-determined.

I cannot use set_socket_blocking($socket, 0) in example 1 instead of 
set_nonblock($socket) as it will generate an errora s follows:

Warning: Supplied argument is not a valid File-Handle resource ...

I believe that in example 1 the socket is not being set to nonblock mode?

Can anyone verfiy this, give me a better way, or maybe just put me out 
of my misery :-)

Regards,

Joseph








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sockets (long)

2001-04-04 Thread Joseph Blythe

Plutarck wrote:

 Very recently (a few days at most ago) someone was complaining about the
 problem you are having.
 
 According to them they can't get the socket function to accept socket
 nonblocking.
 
 It would seem that the function is broken, so you can't set nonblocking to a
 valid value at the current time.
 
 Hopefully it will be fixed in 4.0.5, due out in a few days.


It was probaly me as I posted a message about this a few days ago ;-)

I really hope that it does get fixed in 4.0.5

Oh well as they say !@#$ happens,

Thanks,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sockets (long)

2001-04-06 Thread Joseph Blythe

Yasuo Ohgaki wrote:

 set_nonblock() is in PHP C source, but not in the PHP Manual. May be it's dead?
 
 It seems it take one parameter (file descriptor), let us know if it works. I
 might want to use it in the future :)


Yasuo,

There is one mention of set_nonblock() in the manual under 
accept_connect() under the socket functions. I believe that the new 
socket functions non blocking mode is dead in the current version of php 
at least under linux.

Regards,

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] validating form data via javaScript when stored in an array

2001-04-09 Thread Joseph Blythe

G'day,

I was wondering if anyone knows how to get the following to work:

--snip from head--
script language="JavaScript"
//--
function validateForm(theForm) {
   if ( theForm.input[name].value == "" ) {
   alert("You must type a value for NAME.");
   theForm.input[name].focus();
   return false;
   }

}
!--
/script

--/snip--
--snip from body---

form name="form" method="post" action="whatever" onSubmit="return 
validateForm(this);"
input type="text" name="input[name]"
input type="text" name="input[address]"
input type="submit" value="submit"
/form

--/snip--

Now the above doesn't work as I think javascript does not understand 
arrays? or I don't understand how javascript deals with arrays??

Any help/suggestions would be great, sorry if this post is a little off 
topic in the way of javascript but I would not be having this trouble if 
I weren't passing the form data to php via an array :-)

Regards,

Joseph.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] validating form data via javaScript when stored in an array

2001-04-09 Thread Joseph Blythe

Morten Winkler Jrgensen wrote:

 
You will have to declare
SCRIPT LANGUAGE="javascript 1.2"
 
   myArray  = new Array();
 
   myArray[0] = "a string";
   myArray[1] = 11;
   myArray[2] = new Array();
/SCRIPT
 
since JavaScript 1.2 has arrays implemented.
 
Thanks for that, but my problem being that I have just collected all my 
form data in an array:

input[keyname]

how do I now build the equivelent js array to validate the data?

I tried the following still does not work:

--snip from head--
script language="JavaScript1.2"
//--
input = new Array();

function validateForm(theForm) {
  if ( theForm.input[name].value == "" ) {
  alert("You must type a value for NAME.");
  theForm.input[name].focus();
  return false;
  }

}
!--
/script

--/snip--
--snip from body---

form name="form" method="post" action="whatever" onSubmit="return 
validateForm(this);"
input type="text" name="input[name]"
input type="text" name="input[address]"
input type="submit" value="submit"
/form

--/snip--

How do I force all the data into the javascript array, while still 
setting the array to input[keyname]?

Any help appreciated,

Regards

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] array_push but with key, value pairs

2001-04-16 Thread Joseph Blythe

Hey all,

I was just trying to figure out something that should be quite simple 
but seems to be eluding me,

consider the following:

$input = array();
while ( list($key, $val) = each($HTTP_POST_VARS) ) {
   if ( $key != "Submit" )  {
   array_push($input, $val);
   }

}

Ok fine, I now have an associative array with a numeric index, but 
hangon I wanted to push the key = value into the array. How would I do 
this, I have tried a couple of things but am having some really crazy 
results ;-)

What I am really trying to do is create a new array from the 
HTTP_POST_VARS while excluding certain fields, like Submit or the X and 
Y values from a image button.

Any ideas/suggestions are very welcomed,

Regards

Joseph,



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] array_push but with key, value pairs

2001-04-16 Thread Joseph Blythe


Peter Houchin wrote:

 maybe tring this ...
 $input = array();
 
 reset ($HTTP_POST_VARS);
 
 while ( list($key, $val) = each($HTTP_POST_VARS) ) {
if ( $key != "Submit" )  {
array_push($input, $val);
}
 
 }


Hmm, as far as I can see this will just reset the internal pointer back 
to the start of the HTTP_POST_VAR array, I suppose this should be done   
in case I have called 'each' on the array before, but it does not answer 
my question being: I want to push the key and value into an array not 
just the value. I basically need array_push functionality but with the 
ablility to use your own index values.

I hope this is more clear.

Regards

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] array_push but with key, value pairs

2001-04-16 Thread Joseph Blythe

Peter Houchin wrote:

 what about if you assign the key to = the id (if in a data base)?
 
 maybe like
 
 while (list ($key, $val) = each ($id)) { 
  if ( $key != "Submit" )  {
 
array_push($input, $val);
}
 
 }
 
I am not using a database for this part as I am just collecting the data 
to validate. I really want to know how to create a new array in a while 
loop, which contains the key and value pairs of the array passed to 
each. So lets say the above code would output:

0 = value1
1 = value2
2 = value 3
4 = value4

But I want to create:

keyname1 = value1
keyname2 = value2
keyname3 = value3
keyname4 = value4

Does anyone understand what I am on about?

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] array_push but with key, value pairs

2001-04-17 Thread Joseph Blythe

Dean Hall wrote

 Instead of 'array_push', do this:
 
 $input[$key] = $val;
 
Hey thanks dean that did the trick, I was trying:

$array[] = $key . "=" . $val

which of course doesn't work hehe.

Regards

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP_POST_VARS not and array when used in a function?

2001-04-17 Thread Joseph Blythe

Rasmus Lerdorf wrote:

 It is a normal global variable.  Like all other global variables you need
 to declare the fact that you want the global variable inside a function.
 Simply put: global $HTTP_POST_VARS; at the top of your function and it
 will work just fine.
 
 Read the section on variable scope in the PHP documentation.


Thanks Rasmus,

I should really be tarred and feathered eh :-)

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Strange errors

2001-04-25 Thread Joseph Blythe

Hey all,

I keep getting this error message on a couple of pages from a site I am 
currently working on, the strange thing about this is there are no 
included files in 'browser.php' and I am certainly not including 
'browser.php' anywhere.

Warning:  Failed opening '/home/binary/public_html/browser.php' for 
inclusion (include_path='./inc:/usr/local/lib/php:.') in Unknown on line 0

If anyone knows what is wrong or  has had a simular problem please let 
me know.

Regards

Joseph






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange errors

2001-04-25 Thread Joseph Blythe



Chris Fry wrote:

 Have a look at php.ini in /usr/local/lib
 
 It looks like your prepend file is browser.php - just comment that line out.

Those lines in the php.ini are blank

; automatically add files before or after any PHP document
auto_prepend_file   =
auto_append_file=

Hmm, all the scripts look fine, I have restarted apache too. This has me 
stuffed!

Regards

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange errors

2001-04-25 Thread Joseph Blythe


Mark Maggelet wrote:

 On Thu, 26 Apr 2001 09:54:04 +0930, Joseph Blythe 
 ([EMAIL PROTECTED]) wrote:
 
 Chris Fry wrote:
 
 Have a look at php.ini in /usr/local/lib
 
 It looks like your prepend file is browser.php - just comment that
 line out.
 
 Those lines in the php.ini are blank
 
 ; automatically add files before or after any PHP document
 auto_prepend_file   =
 auto_append_file=
 
 
 they could be also be set in .htaccess or httpd.conf or maybe 
 somewhere else. the best way to check is phpinfo()

Thanks, it was a permission thing just the error messgage was a little 
strange and there was no error in  apaches error_log for that host hence 
my confusion :-)

Regards

Joseph

 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] hmm sockets (again)

2001-05-01 Thread Joseph Blythe

Hey all,

Just looked through the changelog for 4.0.5 and was suprised to see that 
the socket functions had not been fixed,
(set_nonblock does not seem to work under linux), I have retried my 
scripts under the new version but nothing seems to have changed,

For the time being I am going back to the network and filesystem 
functions which do seem to be more reliable now.

I am a little confused though,about the following extracted from the 
changelog:

 Fixed a compatibility problem in some file functions (fgets, fputs, 
 fread, fwrite).
 The ANSI standard says that if a file is opened in read/write mode, 
 fseek() should be called before switching from
 reading to writing and vice versa.

How does this affect calls to a fsockopen?

Can anybody else can confirm that set_nonblock() is indeed broken. If it 
is I will make sure that the bug is reported.


Regards,


Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] hmm sockets (again)

2001-05-02 Thread Joseph Blythe

Mukul Sabharwal wrote:

 Hi,
 
 I might have missed a follow up or your original
 message, but have you tried socket_set_blocking()

Mukul,

Yes, socket_set_blocking  does not work with the new socket functions, 
it is for the network functions, one must use set_nonblock() which to 
the best of my knowledge does not work under linux (or windows?)

If you do a search in the list achive for sockets you will see some 
posts about this from me which go into more detail.

Regards,

Joseph




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] array 2 links

2001-05-03 Thread Joseph Blythe

Hello,

I seem to be having some difficulty understanding why the following function skips 
every 5th array item, 
basically the following function takes two parameters category and an array, when 
placed inside a table it will generate
links based on the array items splitting the table into columns when more than 4 links 
have been generated. 
However as mentioned every 5th array item is skipped hmm..

The solution is probably really obvious but I can't seem to see it!

function array2links($cat, $arr) {
$i = 0;
$cat = rawurlencode($cat);
while ( list( $key, $val ) = each($arr)) {

$link = a class=\cats\ href=\products.php?Cat=$catCode=$key\ 
title=\$val\$val/abr;
if ( $i  4 ) {
$out .= $link;
} else {
$out .= /tdtd valign=\top\;
$i = 0;
continue;
}
$i++;
}
return $out;
}

Any help/ideas would be appreciated,

Regards,

Joseph.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Please Help

2003-08-01 Thread Joseph Blythe
Sathiyabama,

Is always a good idea to read the manual, search google and the list
archives before posting to this list, the below links should help you get
started.

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

and:

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

Regards,

Joseph


 -Original Message-
 From: John Manko [mailto:[EMAIL PROTECTED]
 Sent: Friday, 1 August 2003 3:56 PM
 To: Sathiyabama
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Please Help


 umm... ok.

 www.google.com
 www.php.net

 that should get you started.


 Sathiyabama wrote:

 Dear PHP Team,
 
 I request your help to sort some issues in using PHP.
 
 1.Chennai IIT has developed one recorder.We can record our voice and
 video.Its user defined extenion is MV4.
 
 My requirement is
 
 1.I want to send video file using mail() function in PHP.So
 how to send
 it.What is the procedure?
 
 2.How to delete one folder using PHP?
 
 
 Please help me ...
 
 Regards,
 Sathiyabama
 
 
 
 
 
 
 
 
 



 --
 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] Re: Red Hat 9, Apache 2, and PHP

2003-07-04 Thread Joseph Blythe
Well said Rasmus, I have also been wondering why PHP with Apache2 wasn't
considered a production enviroment, and if I should be heading that way but
after readinng your post I feel a lot better, I have always been very happy
with Apache1 and PHP if it aint broke then no need to fix I say.

Regards,

Joseph Blythe

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
Sent: Friday, 4 July 2003 4:18 PM
To: Ow Mun Heng
Cc: Mark Charette; [EMAIL PROTECTED]; Shena Delian O'Brien
Subject: RE: [PHP] Re: Red Hat 9, Apache 2, and PHP


Apache2 has a number of different modes it can work in.  These modes are
called MPM's.  The default MPM is called Worker which is a multithreaded
model.  PHP, mod_perl, mod_python, and any other similar technology which
links directly into the httpd processes will need to be perfectly
threadsafe and reentrant to work effectively with a threaded Apache2 mpm.
This is doable for the core of PHP, but there are literally hundreds of
3rd party libraries that can be linked into PHP and nobody whether or not
these libraries are threadsafe.  And figuring out if a specific library is
threadsafe or not is non-trivial and it can very from one platform to
another.  And just to make it even harder, this stuff will appear to work
fine until you put it under load or hit very specific race conditions
which makes it nearly impossible to debug.

So, since we can't tell you for sure that a threaded Apache2 mpm + PHP
will work we do not suggest you use it for a production server.  And since
we can't know for sure, none of the main PHP developers use this
combination for our own servers which compounds the problem because it is
not receiving anywhere near the amount of realworld testing required to
work out all the little issues above and beyond this threading unknown.

There is an Apache2 mpm, called prefork, which isn't threaded and
basically makes Apache2 look like Apache1.  But hey, we have a very good
server already that looks like Apache1.

In the end I don't see Apache2+PHP ever becoming a production platform
with the current architecture.  The only way I see it ever working is to
pull PHP out of Apache and use a fastcgi approach.  Or, with time, perhaps
we will learn how to make sure a library is perfectly threadsafe and safe
to use in a multithreaded Apache2.

For now, I really see no reason not to simply use Apache1 if you want a
robust, fast and stable web server.

-Rasmus

On Fri, 4 Jul 2003, Ow Mun Heng wrote:

 Does anyone have any idea or could give me an idea why php  apache 2.0 is
 not 'good' together?



 Cheers,
 Mun Heng, Ow
 H/M Engineering
 Western Digital M'sia
 DID : 03-7870 5168


 -Original Message-
 From: Mark Charette [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 04, 2003 9:02 AM
 To: [EMAIL PROTECTED]; Shena Delian O'Brien
 Subject: Re: [PHP] Re: Red Hat 9, Apache 2, and PHP


 Apache 2.x.x IS a production quality server, just not with PHP. Works
great
 with Tomcat, mod_jk2, Struts, etc.

 - Original Message -
 From: Shena Delian O'Brien [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, July 03, 2003 8:04 PM
 Subject: Re: [PHP] Re: Red Hat 9, Apache 2, and PHP


  Does anyone know why Red Hat would switch to Apache 2.x.x when it is
  well known that 2.x.x is NOT a production version?
 
  Brad Pauly wrote:
   Just thought I would share my experience with RH9. I have been running
   Apache 1.3.27 and PHP 4.3.2 on RH9 for a couple weeks (since 4.3.2
came
   out anyway, and 4.3.1 prior to that) on a test server. All are
compiled
   from source. The only problem I have had was a bug with the version of
   mogrify that is bundled with RH9. That was fixed by 'upgrading' to an
   older version. Other than that it has been fine.
  
   Brad
  
  
  
  
 
 
  --
  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] controlling winamp with COM

2003-07-21 Thread Joseph Blythe
I know nothing about using php and COM under windows but a good place to
start would be:

http://www.php.net/manual/en/ref.com.php

regards,

Joseph

 -Original Message-
 From: Diego Fulgueira [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, 22 July 2003 1:10 PM
 To: John Herren; [EMAIL PROTECTED]
 Subject: Re: [PHP] controlling winamp with COM


 Look, i don't know if you already received a reply for your
 message, but i
 can tell you i know a lot about PHP and i have absolutely no
 idea how to do
 this.

 I will just remind you that PHP is intended to be used as a
 server to client
 technology and that it might have some indirect interaction
 with winamp, but
 only on the server.

 What you need is a lower level techonolgy. To do this, i would try to
 approach the problem with C/C++ or VisualBasic and then build
 an interface
 to make it work from PHP. But this would be kinda messy.

 Good luck. I really hope you don't give up on this, because i
 think noone
 has ever done anything like it, and is always good to know
 that we people on
 this mailing list, are each day more powerful.

 CHEERS.
 Diego.

 - Original Message -
 From: John Herren [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 21, 2003 9:25 PM
 Subject: [PHP] controlling winamp with COM


  Is there any way to control an open winamp application in
 php? I want to
  use php as a scheduler to play Winamp. The API has system
 calls to do
  so, but I don't know how to implement the windows calls.
 
 
  --
  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