[PHP] cURL on freebsd

2010-03-30 Thread Shane Hill
can anyone tell me why the cURL code below produces a POST request as
expected on linux, but the same code on freebsd is forced to be a GET
request?

the linux box is running php 5.2.11
the freebsd box is running 5.3.2

is there a bug in 5.3.2?  a search does not turn anything up.

=

   function makePostRequest( $url , $params ) {
$ch = curl_init();

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$headers = array(
'Content-type: application/json',
'Expect:'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_UPLOAD, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$content = curl_exec($ch);

$errorCode = (int)curl_getinfo($ch,
CURLINFO_HTTP_CODE);
return array(content = $content, errorCode =
$errorCode);
}


Re: [PHP] cURL on freebsd

2010-03-30 Thread Shane Hill

On Mar 30, 2010, at 19:50, Tommy Pham tommy...@gmail.com wrote:

On Tue, Mar 30, 2010 at 7:36 PM, Shane Hill shanehil...@gmail.com  
wrote:

can anyone tell me why the cURL code below produces a POST request as
expected on linux, but the same code on freebsd is forced to be a GET
request?

the linux box is running php 5.2.11
the freebsd box is running 5.3.2

is there a bug in 5.3.2?  a search does not turn anything up.



Just curious, what version of FreeBSD?  Did you compile PHP 
extensions or used the packages?


Freebsd 7.2 stable

I compiled everything

enohPi ym morf tnes

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



[PHP] PHPDFS on 20 amazon instances

2009-08-28 Thread Shane Hill
Hi folks,

A few weeks ago I started a php project for building a highly scalable
distributed file system similar to mogileFS. Well, I did just that and
called it PHPDFS and I just completed a test of PHPDFS using 20 ec2
instances and PHPDFS performed quite well.

I setup 20 (5 clients, 15 servers)  m1.large amazon instances and uploaded
250GB of data and downloaded 1.5 terabytes of data.  Total overall transfer
was 1.8 TB

The blog has more info and links to 870 graphs and the 300mb of data that
was collected and analyzed.:

http://phpdfs.blogspot.com

Here are some highlights:

   - 500 threads (5 java clients, 100 threads each)
   - 15 servers
   - ~250 GB uploaded (PUT requests) (individual files between 50k and 10mb)
   - ~1.5 Tb downloaded (GET requests)
   - ~1.8 TB transfer total
   - ~47mb / sec upload rate
   - ~201 requests / sec overall
   - The data was very evenly distributed across all nodes
   - 40 replicas were lost and totally unrecoverable amounting to .030% data
   loss

Basically,  PHPDFS performed quite well,  There was a small amount of data
loss due to one of the servers getting really hot.  What happened was a few
uploads to the hot server were corrupted and the corrupted objects were
replicated.  Better error handling and a checksum mechanism will eliminate
something like that from happening.  So that is next on the development
list.

Anyway, I just wanted to let the list know that this is coming along quite
nicely and actually has gotten some attention from the folks at the Storage
Systems Research Center at UC Santa Cruz.  http://www.ssrc.ucsc.edu/

if anyone has questions or wants to get involved please let me know.

you can download phpdfs here:

http://code.google.com/p/phpdfs/downloads/list

peace,

-Shane


Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Shane Hill
2009/7/22 João Cândido de Souza Neto j...@consultorweb.cnt.br

 You made a mistake in your code:

 ?php the_title(); ?

 must be:

 ?php echo the_title(); ?


?= the_title(); ?

also works.

-Shane





 --
 João Cândido de Souza Neto
 SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS
 Fone: (0XX41) 3033-3636 - JS
 www.siens.com.br

 Sebastiano Pomata lafayett...@gmail.com escreveu na mensagem
 news:70fe20d60907221355m3fa49a75ua053d2f1b9aca...@mail.gmail.com...
  Hi all,
 
  A little doubt caught me while I was writing this snippet of code for
  a wordpress template:
 
  ?php if (the_title('','',FALSE) != 'Home') { ?
  h2 class=entry-header?php the_title(); ?/h2
  ?php } ?
 
  I always thought that php was called only between the ?php ? tags,
  and I'm pretty sure that's right, while HTML code was simply wrote in
  document as is, without further logic.
  Now, I can't figure out how this snippet works: I mean, shouldn't HTML
  code be simply put on document, as it is outside php invoke?
  Effectively if the title of page is 'Home', the HTML part is totally
  skipped.
 
  Is the if construct that does all the magic inside?



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




Re: [PHP] php distributed file system

2009-07-09 Thread Shane Hill
On Thu, Jul 9, 2009 at 1:10 AM, Per Jessen p...@computer.org wrote:


 Sounds a lot like glusterfs.  http://www.gluster.org/


yep,  it is similar, except I am not aiming to be all that comprehensive of
a file system.  I really want to create something extremely robust, that can
be used in web apps and that will take just a few minutes for even a php
novice to get going. I know this is possible to achieve.

phpdfs is really no different than a standard php web app, probably easier
than most.  there are only a couple little classes and the configuration is
simple.  another thing is all of the code and technologies that phpdfs is
built upon are very very familiar to the php community already.  just php
and your favorite flavor of web server and away you go.

thanks for the note,

-Shane







 /Per

 --
 Per Jessen, Zürich (16.1°C)


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




Re: [PHP] Simple login form with cookies

2009-07-08 Thread Shane Hill
just an observation here, but are we not getting close to breaking another
rule?

Do not high-jack threads, by bringing up entirely new topics. Please create
an entirely new thread copying anything you wish to quote into the new
thread.

I know some feel this is important but if i was searching for some help with
a simple login form and cookies,  this thread would be useless.

peace,

-Shane

On Wed, Jul 8, 2009 at 12:23 PM, Bob McConnell r...@cbord.com wrote:

 From: Tony Marston

  I do not follows rules which cannot be justified beyond the expression
 It
  is there, so obey it! Why is it there? What are the alternatives?
 What harm
  does it do? What happens if the rule is disobeyed? Top posting existed
 in
  the early days of the internet, and for a logical reason. Then some
 arrogant
  prat came along and said I don't like this, so I am going to make a
 rule
  which forbids it!. I don't like this rule, so I choose to disobey it.

 Daniel already explained to you why it is there. Long threads get too
 confusing with top posting. When posted correctly they read
 chronologically from top to bottom so they can be followed and
 understood when referenced a year or two later.

 Top posting did not exist in the early days of the Internet. I was
 active on email listserves and Usenet newsgroups 18 years ago, long
 before Microsoft discovered them and decided that top posting should be
 the norm. All of the other news and email clients I have ever used
 defaulted to bottom posting. It was only in Outlook 2003 that Microsoft
 finally removed that option completely. Previous versions allowed bottom
 posting and even handled the attribution markup correctly.

 Bob McConnell

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




[PHP] php distributed file system

2009-07-08 Thread Shane Hill
hi folks,

I am on a couple of php lists and on one of them we were having a discussion
about scalable enterprise class systems to store images for things like user
photo and file uploads, etc. and whether or not something existed in php to
facilitate this.  well the discussion inspired me and I created a scalable,
cloud-like app written in php called phpdfs.  first pre-alpha release went
up monday:

http://code.google.com/p/phpdfs/

a blog is here:

http://phpdfs.blogspot.com/

if anyone is familiar with mogileFS,  phpdfs does basically the same thing
without the need of a central index to locate files across mutliple boxes.
so bye bye mysql and associated problems and hello parallelism.  phpdfs is
pure php and is really quite easy to get going.   phpdfs will replicate your
data and will automatically and optimally move data when new resources are
added (scaling out)  and old resources are removed (scaling in).

according to the authors of the algorithms upon which phpdfs is based,
Yahoo, Symantec and LSI use the algorithms in some of their products and
services.  this is for real.

currently I am testing the codebase as it is and doing a lot of empirical
data collection to show correct object distribution and that minimal data is
moved when the system is scaled out or in and that all data in the system is
highly available. The formal proofs for the algorithms can be found in the
white papers linked from the blog and the project home page. things are
still very pre-alpha but usable and will get better and better  :)

if anyone wants to help out let me know.  I hope the community finds this
useful.

peace,

-Shane


Re: [PHP] Escaping double quotes

2006-05-25 Thread Shane
Not sure I understand your question correctly. I think you can just use 
soemthing like:


echo 'form action=myform.php method=post';

Mindaugas L wrote:

or heredeoc syntax :)

On 5/25/06, John Nichel [EMAIL PROTECTED] wrote:



Pavleck, Jeremy D. wrote:
 So I'm writing this page (PHP Newbie here) and it checks to see if a 
var

 is set, if it isn't it spits out the form info like so: echo form
 action=myform.php method=post;
 Now is there a way to 'wrap' that so I don't have to escape quotes?
 Something like perls 'qq' function is what I'm looking for.
 I tried a few different functions from the website, magic_quotes,
 addslashes, htmlspecial etc etc but none did what I was looking for



http://us2.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc 



--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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







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



[PHP] Weird Image Problem

2005-06-30 Thread Shane Little
I'm bin2hex'ing images from an upload script and inserting into a mysql 
blob field.  The php script that re-packs the hex data back to binary, 
does the createimagefromstring() and streams the image to the browser is 
generating a corrupted image... i.e. The image looks fine until part-way 
down... then... no more image; just a gray background where the rest of 
the image should be.  Seems to happen on image any larger than 30 or so 
kilobytes.  Anybody working the the php image libraries seen this before?


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



Re: [PHP] Weird Image Problem

2005-06-30 Thread Shane Little

Kristen G. Thorson wrote:
MySQL blobs are actually limited to 64K.  I think a MEDIUMBLOB holds 
about 16 MB if you're dead-set on storing the image in the database.  
You might want to check that your max_allowed_packets size is large 
enough.  You can find that by querying


SHOW VARIABLES LIKE 'max_allowed_packet';

I just double-checked the manual.  It does say that this needs to be set 
to the largest blob.



kgt





doh!

That seems to have been the problem.  I THOUGHT I had set the field up 
as a mediumblob or longblob turns out it was only a blob.. and 
you're right.. ~64k max


I had already checked the MAX_ALLOWED_PACKET yesterday and bumped it up 
to 16M.


Figures...  I've been staring at the computer screen too long.

Thanks for the help.

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



[PHP] Showing tables (converting from MySQL to Oracle)

2005-06-23 Thread Shane Presley
Hello,

I've recompiled PHP to use Oracle, and been able to run a quick test
script that looks like...

?php
if ($c=OCILogon(user, pw, server)) {
  echo Successfully connected to Oracle.\n;
  OCILogoff($c);
} else {
  $err = OCIError();
  echo Oracle Connect Error  . $err[text];
}
?


So now I'm going through and converting my MySQL code to Oracle.  I've
finished the connect functions, but getting hung up on how to do
queries.  For example the first query wants to SHOW TABLES.  Not sure
how to do this with Oracle calls?

function get_tables($link) {
$tableList = array();
$query = SHOW TABLES;
$result = perform_query($query, $link);
while($row = fetch_array($result)) {
array_push($tableList, $row[0]);
}

return $tableList;
}


function perform_query($query, $link) {
if($link) {
$result = mysql_query($query, $link) or die('Query
failed: ' . mysql_error());
}
else {
die('No DB link');
}

return $result;
}


Thanks!
Shane

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



[PHP] Compiling problem (apxs)

2005-06-15 Thread Shane Presley
Hello,

I have a RedHat system running Apache and PHP Version 4.3.2.  These
were pre-installed Red Hat packages.  Things worked nicely.

But I needed to recompile PHP, because I need Oracle support, and this
package wasn't compiled with

  --with-oracle=/path/to/oracle/home/dir
  --with-oci8=/path/to/oracle/home/dir

So I downloaded the source, and tried to setup the ./configure with
the same options as the existing version, plus the two oracle lines.

But the compile fails with 

checking for Apache 1.x module support via DSO through APXS... 

Sorry, I was not able to successfully run APXS.  Possible reasons:

1.  Perl is not installed;
2.  Apache was not compiled with DSO support (--enable-module=so);
3.  'apxs' is not in your path.  Try to use --with-apxs=/path/to/apxs
The output of apxs follows
./configure: line 3169: apxs: command not found
configure: error: Aborting

What's odd is that when I look at phpinfo for the running PHP, it says
it was compiled like that.  But it's true that apxs does not exist on
the system.

Do I have to recompile Apache as well?  When I tried it without apxs,
it compiled and installed fine, but Apache was still loading the old
libphp4.so.  So the Apache version was still without Oracle.

All I'm trying to do is get PHP running with Oracle support. 

Thanks
Shane

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



[PHP] Apache fails to start (oracle path problem?)

2005-06-15 Thread Shane Presley
Hello,

I'm having trouble compiling and running PHP with oracle support.

I was able to compile with the appropriate configure script, but only
after I set my Oracle environment variables in my shell.  That was no
problem.

The problem is, when Apache goes to load the php module, it fails,
because it can't find the oracle library.  Interactively I had to do
this...

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

But Apache..
Starting httpd: Syntax error on line 207 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/lib/httpd/modules/libphp4.so into server:
libclntsh.so.10.1: cannot open shared object file: No such file or
directory
[FAILED]


Not sure how I could set that for Apache?

Shane

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



Re: [PHP] Apache fails to start (oracle path problem?)

2005-06-15 Thread Shane Presley
Thank you! That fixed it.  I just had to define the Oracle env
variables on the httpd startup script.

So that was a huge help :)

Shane

On 6/15/05, Kristen G. Thorson [EMAIL PROTECTED] wrote:
 I ran into a similar problem trying to get ODBC working with a Progress
 database.  I managed to solve it by setting the environment variables in
 the httpd startup script.
 
 Not much help, I know, but a suggestion. ;)
 
 good luck
 kgt
 
 
 
 
 Shane Presley wrote:
 
 Hello,
 
 I'm having trouble compiling and running PHP with oracle support.
 
 I was able to compile with the appropriate configure script, but only
 after I set my Oracle environment variables in my shell.  That was no
 problem.
 
 The problem is, when Apache goes to load the php module, it fails,
 because it can't find the oracle library.  Interactively I had to do
 this...
 
 export LD_LIBRARY_PATH=$ORACLE_HOME/lib
 
 But Apache..
 Starting httpd: Syntax error on line 207 of /etc/httpd/conf/httpd.conf:
 Cannot load /usr/lib/httpd/modules/libphp4.so into server:
 libclntsh.so.10.1: cannot open shared object file: No such file or
 directory
 [FAILED]
 
 
 Not sure how I could set that for Apache?
 
 Shane
 
 
 
 
 


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



Re: [PHP] Oracle Interface

2005-06-13 Thread Shane Presley
On 6/10/05, Richard Lynch [EMAIL PROTECTED] wrote:
 On Fri, June 10, 2005 8:48 am, Shane Presley said:
  Where can I find some info on integrating Oracle and PHP?
 
 http://php.net/oracle
 
 pretty much covers it.

Thanks!  You're right, that looks pretty straight forward.  Although I
do have two additional questions...

How do I find out how my PHP was compiled? The documentation states:
  You have to compile PHP with the option --with-oracle[=DIR], where
DIR defaults to your environment variable ORACLE_HOME.

But I'm using PHP from the Red Hat default install (I didn't compile it).

Also, do you know if this is Oracle version independent.  More
specifically will this work with Oracle 10g?

Thanks
Shane

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



Re: [PHP] Oracle Interface

2005-06-13 Thread Shane Presley
On 6/13/05, Jay Blanchard [EMAIL PROTECTED] wrote:
 To find out how your PHP was compiled create a test page with this
 only...
 
 ?php
 
 phpinfo();
 
 ?
 
 And then load the page from your web server. It will return a wealth of
 information to you. As far as Oracle compatability it would be hard to
 know with the info you provided, but you'll find out things like PHP
 version when you do the test page.
 

Thanks!  So it looks like PHP wasn't compiled with the needed variable.

PHP Version 4.3.2

'./configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux'
'--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr'
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin'
'--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect'
'--disable-debug' '--enable-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-db4=/usr'
'--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd'
'--enable-gd-native-ttf' '--with-ttf' '--with-gettext'
'--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-pspell' '--with-regex=system'
'--with-xml' '--with-expat-dir=/usr' '--with-pcre-regex=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-discard-path' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--enable-mbstring'
'--enable-mbstr-enc-trans' '--enable-mbregex'
'--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl'
'--with-kerberos=/usr/kerberos' '--with-ldap=shared'
'--with-mysql=shared,/usr' '--with-pgsql=shared'
'--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath'
'--enable-shmop' '--enable-versioning' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--enable-mcal'
'--with-apxs2filter=/usr/sbin/apxs'

However, there is a section about dbx...

dbx support enabled
dbx version 1.0.0
supported databases MySQL ODBC PostgreSQL Microsoft SQL Server
FrontBase Oracle 8 (oci8) Sybase-CT

Not sure what that is?

Shane

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



[PHP] Oracle Interface

2005-06-10 Thread Shane Presley
Where can I find some info on integrating Oracle and PHP?

I had some PHP front ends to a MySQL database, worked great.  Our DBAs
want to change the back end from MySQL to Oracle 10g.  How hard would
it be to convert my PHP scripts, and where would I go to read up on
Oracle -- PHP?

Thanks
Shane

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



[PHP] PHP and Post Data

2004-12-21 Thread Shane Mc Cormack
Hi
I'm trying to integrate PHP Support into a basic webserver i am creating 
for personal use (Windows). However i've run into a problem.

I've got the _GET vars working, (using the QUERY_STRING Environment 
Variable), yet i can't figure out how to get the _POST vars set.

my webserver has the POST data stored in a variable, i jsut need to know 
how to tell PHP the post data.

On the webserver GET support works perfectly, as does POST support, all 
i need to do is tell PHP what the data is.

Any help would be appreciated.
-Shane
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP and Post Data

2004-12-21 Thread Shane Mc Cormack
That works on a normal webserver yes.
However, I am programming my own, and I have the Posted Data stored in 
the memory of the webserver, and when i execute the PHP.exe i need to 
tell it what the PostData is somehow.

- Shane
John Nichel wrote:
Shane Mc Cormack wrote:
Hi
I'm trying to integrate PHP Support into a basic webserver i am 
creating for personal use (Windows). However i've run into a problem.

I've got the _GET vars working, (using the QUERY_STRING Environment 
Variable), yet i can't figure out how to get the _POST vars set.

my webserver has the POST data stored in a variable, i jsut need to 
know how to tell PHP the post data.

On the webserver GET support works perfectly, as does POST support, 
all i need to do is tell PHP what the data is.

Any help would be appreciated.

Not sure I follow quite what you're asking, but if you have a form like 
this...

form action=myform.php method=post
input type=text name=foo /
input type=hidden name=bar value=bob /
input type=submit /
/form
Once you submit the form (to myform.php), the data posted from the form 
will be available in the $_POST super global array...

$_POST['foo']
$_POST['bar']
http://us4.php.net/manual/en/language.variables.external.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP and Post Data

2004-12-21 Thread Shane Mc Cormack
I have my own reasons for wanting to write my own webserver, but thats 
not the point here. I just need/want to know how to tell the PHP.exe 
what the POST variables are.

- Shane
Travis Conway wrote:
Why reinvent the wheel by writing your own webserver?  Apache allows for 
it to be used within other products.  Just redistrbute it according to 
the license.
- Original Message - From: Shane Mc Cormack 
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 10:36 PM
Subject: Re: [PHP] PHP and Post Data


That works on a normal webserver yes.
However, I am programming my own, and I have the Posted Data stored in 
the memory of the webserver, and when i execute the PHP.exe i need to 
tell it what the PostData is somehow.

- Shane
John Nichel wrote:
Shane Mc Cormack wrote:
Hi
I'm trying to integrate PHP Support into a basic webserver i am 
creating for personal use (Windows). However i've run into a problem.

I've got the _GET vars working, (using the QUERY_STRING Environment 
Variable), yet i can't figure out how to get the _POST vars set.

my webserver has the POST data stored in a variable, i jsut need to 
know how to tell PHP the post data.

On the webserver GET support works perfectly, as does POST support, 
all i need to do is tell PHP what the data is.

Any help would be appreciated.

Not sure I follow quite what you're asking, but if you have a form 
like this...

form action=myform.php method=post
input type=text name=foo /
input type=hidden name=bar value=bob /
input type=submit /
/form
Once you submit the form (to myform.php), the data posted from the 
form will be available in the $_POST super global array...

$_POST['foo']
$_POST['bar']
http://us4.php.net/manual/en/language.variables.external.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] hi

2004-04-02 Thread shane
Here is it!


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

RE: [PHP] Retain form values...

2004-03-18 Thread Shane McBride
How about passing the form variables to a hidden field on the next page? I
used this for several page forms before. Also, sessions work well.

Shane

-Original Message-
From: Firman Wandayandi [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 3:43 PM
To: [EMAIL PROTECTED]
Cc: PHP-GEN
Subject: Re: [PHP] Retain form values...


Hi Jonathan,

You can do this, with one file, display a form, proceed the fields, and fill
the field form objects with the value. If you use separate page in my mind
is impossible.

Regards,
Firman

- Original Message -
From: Jonathan Villa [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 3:01 AM
Subject: [PHP] Retain form values...


 I want to be able to submit the page to another page vs PHP_SELF.  On
 that page I want to be able to validate the form, and if it fails,
 return the user to the previous page.  Now that's easy, but the catch is
 that I want to retain/repopulate their field values.

 I was thinking of forcing a history.back if possible, but would rather
 use some server side code.  I tried researching what can be done with
 sending headers, but I don't want to use a GET method.  I want to use
 POST.

 thoughts?

 --
 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] Retain form values...

2004-03-18 Thread Shane McBride
Gotcha. I typically use javascript to validate before the form is posted to
validate.

shane

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 6:23 PM
To: Shane McBride; PHP
Subject: RE: [PHP] Retain form values...


Shane McBride mailto:[EMAIL PROTECTED]
on Thursday, March 18, 2004 2:50 PM said:

 How about passing the form variables to a hidden field on the next
 page? I used this for several page forms before.

that won't work because he's not doing a multi-page form. he just wants
to send the form data back *if* the form fails his validation.



chris.

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



RE: [PHP] Retain form values...

2004-03-18 Thread Shane McBride
Actually all form validation is done before the form action takes place, so
that way we do not loose input.

shane

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 6:38 PM
To: Shane McBride; PHP
Subject: RE: [PHP] Retain form values...


Shane McBride mailto:[EMAIL PROTECTED]
on Thursday, March 18, 2004 3:37 PM said:

 Gotcha. I typically use javascript to validate before the form is
 posted to validate.

ok.. but i don't see how that helps. you're still validating on the
server side right? in which case you could still have a failed
validation, thus the need to send the users data back to the original
page.



chris.

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



[PHP] Simple: Whats wrong with this?

2004-03-17 Thread Shane McBride
I have a form variable I want to increment by a value of 1 each time the
page loads. Here's what I have so far:

if(!isset($correct)) {
$correct = 0;
} else {
$correct = $correct++;
}

Seems like it should work?

Thanks!
Shane

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



RE: [PHP] Simple: Whats wrong with this?

2004-03-17 Thread Shane McBride
It doesn't seem to work either way for me.

Shane

-Original Message-
From: Jake McHenry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 12:01 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Simple: Whats wrong with this?


 No.

 $correct++;

 Is all you need for the second condition, it automatically sets itself
 back.



Does this always work? In my timesheet app, I have to do $counter = $counter
+ 1, because for some reason the $counter++; doesn't work. It just doesn't
work, no incrementation of the variable. Is there something in php.ini that
can prohibit this from working?

Thanks,
Jake

--
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] Simple: Whats wrong with this?

2004-03-17 Thread Shane McBride
I am just trying to get the variable to increment, than I will be working on
a session. It's basically being used to keep track of correct/incorrect
answers for an online quiz.

Here's what I am trying:

if(!isset($correct)) {
$correct = 0;
} else {
$correct++
}

Shane

-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 12:06 PM
To: Shane McBride
Cc: PHP
Subject: RE: [PHP] Simple: Whats wrong with this?


Well I accidentally deleted your original email, but I didn't see where
you were getting the counter variable from. Where is the variable being
stored? You do know that setting $counter++ for one visitor, doesn't
translate the value of $counter to another, right?



On Wed, 2004-03-17 at 12:05, Shane McBride wrote:
 It doesn't seem to work either way for me.

 Shane

 -Original Message-
 From: Jake McHenry [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 17, 2004 12:01 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Simple: Whats wrong with this?


  No.
 
  $correct++;
 
  Is all you need for the second condition, it automatically sets itself
  back.
 


 Does this always work? In my timesheet app, I have to do $counter =
$counter
 + 1, because for some reason the $counter++; doesn't work. It just doesn't
 work, no incrementation of the variable. Is there something in php.ini
that
 can prohibit this from working?

 Thanks,
 Jake

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

Adam Voigt
[EMAIL PROTECTED]

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

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



RE: [PHP] Simple: Whats wrong with this?

2004-03-17 Thread Shane McBride
No, the value still is not incrementing. 

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 12:25 PM
To: Shane McBride; PHP; [EMAIL PROTECTED]
Subject: RE: [PHP] Simple: Whats wrong with this?


Shane McBride mailto:[EMAIL PROTECTED]
on Wednesday, March 17, 2004 9:16 AM said:

 I am just trying to get the variable to increment, than I will be
 working on a session. It's basically being used to keep track of
 correct/incorrect answers for an online quiz.

and so now that you've corrected your code what are the results you are
getting? are they not what you expect/want?


chris.

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



Re: [PHP] php newsgroup portal?

2004-02-29 Thread Shane Nelson
To read this list I use thunderbird:

  http://www.mozilla.org/projects/thunderbird/

It's an email client instead of a newsgroup reader.  Just filter the 
php-general messages into a separate folder and sort it by thread. 
Super easy to use and a very nice piece of software.

Shane

Zhang Weiwu wrote:
Hello. I have been looking for a good php newsgroup reader for some 
time. News portal looks pretty good to me but I haven't tried yet.

There is a very charming project mynewsgroup at mynewsgroup.sf.net, 
particularly it has beautiful looking. But that project seems dead. The 
only mailing list is removed, and nobody look into its forum. I wrote to 
each developer about what is going on but none replied me!

What newsgroup reader do you use?

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


[PHP] apache mysql php windows

2004-02-24 Thread Shane Nelson
Hi Folks

A few days ago on the list I saw someone mention a package that 
includes apache, mysql and php for Windows.  The one install file 
included all these programs.  Anyone remember what it was?

I've checked google and searched through my email list but I can't 
seem to find it!

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


Re: [PHP] Detecting Binaries

2004-02-23 Thread Shane Nelson


Richard Davey wrote:

Hello Axel,

Monday, February 23, 2004, 7:03:38 PM, you wrote:

AIM Guys, this isn't THAT stupid of a question is it? From my perspective,
AIM the way PHP seems to see it is that I should already know what kind of
AIM file I'm looking at. In most cases that's not an unreasonable 
AIM assumption. Unfortunately, that's only good for most cases. PHP is rich

Even Windows doesn't *know* what type of file you've got until you
actually try and open it. You could rename a jpg to mp3 and you won't
know about it until Winamp moans at you as you open it.
FTP programs seem to know what kind of file you are transferring. Hence 
the ability to switch the transfer between AUTO, BINARY and ASCII modes. 
 I usually leave mine in AUTO mode and it seems to figure it out OK. 
I'd suggest looking at the source to an FTP client to see how they do 
it. filezilla is opensource:

  http://filezilla.sourceforge.net/

Good luck.

Shane

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


Re: [PHP] Re: ftp software

2004-02-22 Thread Shane Nelson

I would highly recomend filezilla:

http://filezilla.sourceforge.net/

It's open source, it works great and it doesn't have any ads or spyware like
some of the other 'free' windows ftp programs.



 
 Nathan McIntyre [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hello!
 
  I am new both to PHP and web dev, and I am wondering what ftp software
  would  be best for me to use.
 
 --
 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] [Q] About Method Not Allowed error message

2004-02-20 Thread Shane Nelson

I don't think you can send a POST to a .html page.  Maybe your page
(register_new_member.html) should be .php instead?  Either that or you might
have to change your FORM METHOD=POST back to FORM METHOD=GET

Shane


Quoting Michael T. Peterson [EMAIL PROTECTED]:

 When I click the submit button (after completing a [member registration]
 form), I get the following error message:
 
 Method Not Allowed
 The requested method POST is not allowed for the URL
 /northwest_steelheader/members/register_new_member.html.
 
 This used to work but, during the course of my coding, I've changed
 something that now causes this error.
 
 What does this error mean and can someone tell me what sorts of bobos elicit
 it?
 
 Cheers,
 
 Michael
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



[PHP] Vancouver PHP Conference - January 22-23

2004-01-06 Thread Shane Caraveo
Subject: The PHP Vancouver Conference - January 22-23

The Vancouver PHP Users' Association is proud to present The PHP
Vancouver Conference, a professional and technical conference
focused on the PHP scripting language.
Join the world's leading PHP developers and business professionals as
they share their experience with PHP professionals and students from
around the world.
When:   January 22-23, 2004
Where:  SFU Harbour Centre Campus, Vancouver, BC
Keynote:Rasmus Lerdorf, creator of PHP
Standard attendee rate is only $150 plus applicable taxes, offering an
affordable alternative to US-based events. Student pricing is also
available.
For more information or to register, see:
http://vancouver.php.net/?s=conference
The conference will feature a series of talks on topics ranging from the
upcoming PHP5 to the practical implications of implementing PHP in the
enterprise.
'Birds of a Feather' (BOF) and 'Work in Progress' (WIP) sessions will be
held on the first night. These are informal discussions on technical
topics related to PHP, open to all attendees.
As a conference sponsor, ActiveState is pleased to offer attendees a
free copy of Komodo Personal Edition, the award-winning, professional
IDE for PHP. A coupon for your copy will be provided at the conference.
Sponsorship packages are still available, including exhibition space for
those who wish to promote their products and services. For more
information on sponsorship opportunities, see:
http://vancouver.php.net/?s=sponsorship
Space is limited so book early!
http://vancouver.php.net/?s=conference
I look forward to seeing you there.

Shane Caraveo
Senior Developer, PHP
ActiveState
604.484.6435
http://www.ActiveState.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] In Need of a PHP freelancer...

2003-02-04 Thread Shane
-Original Message-
Greetings... I am in need of a freelancer to write an additional function to our 
company's extranet. Before I go and post a request to this list, I would like to know 
if there is a more appropriate place to post such a request, and still get quality 
folks who know their stuff.

Suggestion are appreciated.
Thanks gang!
- That is all.
NorthBayShane

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




[PHP] Parse out text

2002-12-13 Thread Shane McBride
I have a form that is submitting a Javascript to validate fields before the
form casn be submitted. The problem is that the field name has to be
prefixed with required. So, if I have a field called email, it has to be
called requiredemail in order for the javascript to work.

How can I remove the required before the form is submitted? All I need is
a hint...

Thanks,
Shane



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




[PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Shane
Greetings gang.

You know me, I never ask for help if I haven't checked all my other options, but this 
is day two, and I'm getting spanked on this one.

Some recently moved scripts from a WIN2K server running PHP 4.2.1 to an Apache PHP 
4.2.3 setup have stop accepting HTML Form Variables.

I can pass variables till I am blue in the face, even see them in the URL but they are 
still showing up as (!isset)

My ISP (Whom is using Virtual Directories) has no solution, and I have tried every 
code variation I could think of to troubleshoot it. This code has been working fine 
for Months on the WIN2K box, but just doesn't pass a var on the Linux solution.

Can any Server pros out there possibly throw me a bone? My deadline is looming. :^)

As always, a million thanks in advance.
Yours truly.
-NorthBayShane

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




RE: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Shane
 I can pass variables till I am blue in the face, even 
 see them in the URL but they are still showing up as (!isset)

Are you accessing these variables through $var or $_GET[var]?

I am accessing them as $var.

Example (from memory)

if(!isset($var)){
// do nothing
}else{
// VAR IS SET.. DO SOMETHING
}

Real basic stuff, but if I echo out the value so I see if it matches what I see in the 
above URL I get...

(SAMPLE URL) blah/my_url.php?submit=submit

(SAMPLE CODE) ? echo Submit = .$submit ?

(SAMPLE RESULTS) Submit = 

Thanks gang!

I have never needed to use $_GET[var]
What is the main difference?
Would this be a setting difference between a WIN setup of PHP and a Linux setu of PHP?

- over

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




RE: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Shane
Ahh Yes, Register Globals is off on the new set up, and is ON on the old Win Box.

You folks soo rule
Drinks all around!
-Thanks a million
NorthBayShane

Register_Globals is off by default in version 4.2.3. See the following
manual page for more information.

http://www.php.net/manual/en/language.variables.predefined.php




- Original Message -
From: Shane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 11:08 AM
Subject: [PHP] Pls Help: Moving script from Win to Linux


Greetings gang.

You know me, I never ask for help if I haven't checked all my other
options, but this is day two, and I'm getting spanked on this one.

Some recently moved scripts from a WIN2K server running PHP 4.2.1 to
an Apache PHP 4.2.3 setup have stop accepting HTML Form Variables.

I can pass variables till I am blue in the face, even see them in the
URL but they are still showing up as (!isset)

My ISP (Whom is using Virtual Directories) has no solution, and I have
tried every code variation I could think of to troubleshoot it. This
code has been working fine for Months on the WIN2K box, but just
doesn't pass a var on the Linux solution.

Can any Server pros out there possibly throw me a bone? My deadline is
looming. :^)

As always, a million thanks in advance.
Yours truly.
-NorthBayShane

--
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] Multiple page form

2002-11-26 Thread Shane McBride
Hi there.

It's been a while since I have done any PHP work. I am creating an online
employment application using multiple forms for a client. I was going to use
PHP. I don't remember if I need to pass variables along with the form for
each page, or can I just call them on the last page.

The application form is very long. Any ideas? There may be a script that
exists already?

Anyway, it's nice to be back.

- Shane



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




RE: [PHP] Multiple page form

2002-11-26 Thread Shane McBride
So, you are using a database to store the records?

-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 10:45 AM
To: Shane McBride; [EMAIL PROTECTED]
Subject: Re: [PHP] Multiple page form


 It's been a while since I have done any PHP work. I am creating an online
 employment application using multiple forms for a client. I was going to
use
 PHP. I don't remember if I need to pass variables along with the form for
 each page, or can I just call them on the last page.
 The application form is very long. Any ideas? There may be a script that
 exists already?

What I usually do for my multi-page form is INSERT the data to a table on
the first page then UPDATE that record on subsequent pages.  The only
thing I need to pass on is the primary key value for the record.

Chris



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




[PHP] HTML file to a $var: Pls Help

2002-10-25 Thread Shane
Any way to plug an entire HTML file into a variable?

I looked into file_get_contents() but that was CVS format only.

I need to take a simple HTML file and pass it as a string variable to a mail function.

Any help?
Thanks crew.

- NorthBayShane

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




Re: [PHP] Adding users to a linux system?

2002-10-15 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


you need to be root to add users - and your web server is most likely not 
runings as root (certainly shouldn't be!!)

To make this work, add the user apache runs under to /etc/sudoers  (look at 
the sudo man page),

then change the command you have to this...

sudo /usr/sbin/adduser -g mel -d /dev/null -s /bin/false -p $pass $usuario


That will use sudo to run adduser as root.

btw - try to only allow sudo access for the apache user, and only to use the 
command adduser (e.g. NOT rm or anything else dangerous..)

Also, make very sure that $paqss and $usuario contain only alphanumeric 
characters; no backticks or quotes or anything.


Hope that helps

Cheers

Shane



On Tuesday 15 October 2002 2:16 pm, :: wkwrz entertainment :: wrote:
 $creador = /usr/sbin/adduser -g mel -d /dev/null -s /bin/false -p $pass
 $usuario;
  $creador = exec($creador);
  echo $creador;


 I HAVE THIS, BUT IN THE APACHE LOG FILE I HAVE THIS:
 adduser: unable to lock password file


 what should i do to run the $creador sucefully?

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9rCgK5DXg6dCMBrQRAtm5AKCykAWtTJntkIKIbKx1hH7kAM+i0gCgrd6o
Lz8qZCsNAdhY1orz0yNDLLM=
=sqJ/
-END PGP SIGNATURE-


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




Re: [PHP] Adding users to a linux system?

2002-10-15 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


A C wrapper running setuid root?

I guess there's less chance of getting a 'bad' username to execute arbitrary 
commands, but at the same time I wonder about the possiblity of exploiting 
overflows, but that'd be much harder.  (hmm, if the C program shells to 
adduser anyway the same problem is there?)

I dunno, personally I dont like the idea of _anything_ needing root..

S

On Tuesday 15 October 2002 3:51 pm, Tim Monaghan wrote:
 Is it better to use a c wrapper to do this? thats what Ive always done.
 Which is more secure?

 Tim

 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Custom Programming
 Web Programming community  discussion
 http://www.inter-apps.com



 - Original Message -
 From: Shane Wright [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 15, 2002 9:36 AM
 Subject: Re: [PHP] Adding users to a linux system?



 you need to be root to add users - and your web server is most likely not
 runings as root (certainly shouldn't be!!)

 To make this work, add the user apache runs under to /etc/sudoers  (look at
 the sudo man page),

 then change the command you have to this...

 sudo /usr/sbin/adduser -g mel -d /dev/null -s /bin/false -p $pass $usuario


 That will use sudo to run adduser as root.

 btw - try to only allow sudo access for the apache user, and only to use
 the command adduser (e.g. NOT rm or anything else dangerous..)

 Also, make very sure that $paqss and $usuario contain only alphanumeric
 characters; no backticks or quotes or anything.


 Hope that helps

 Cheers

 Shane

 On Tuesday 15 October 2002 2:16 pm, :: wkwrz entertainment :: wrote:
  $creador = /usr/sbin/adduser -g mel -d /dev/null -s /bin/false -p $pass
  $usuario;
   $creador = exec($creador);
   echo $creador;
 
 
  I HAVE THIS, BUT IN THE APACHE LOG FILE I HAVE THIS:
  adduser: unable to lock password file
 
 
  what should i do to run the $creador sucefully?

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9rDKV5DXg6dCMBrQRAn5JAJ90z11UFAUQ7KBgGIC5OdWJH8XlvwCggqQ6
En4ZsJ31Y617D2IdfDou6pI=
=26WP
-END PGP SIGNATURE-


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




[PHP] String Help PLEASE!

2002-10-08 Thread Shane

Greetings gang, this should be an easy one but it's kicking my butt today.

I need to build a member number in the format of -00- from an auto increment 
ID field from my DB.

I can get the last ID value easy enough, but how the heck can I tag the new ID on to 
the end of the string -00-.

I looked in the manual at chr(), Parse_str() and str_replace() thinking that would do 
it, but no luck.

Can someone point me in the right direction please?
Thanks a bunch folks!!!
- NorthBayShane

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




[PHP] HELP: Carriage returns don't display in HTML

2002-09-27 Thread Shane

Greetings folks.

I need my carriage returns to show up in my HTML output from my text form field.

There is a JavaScript function that will convert carriage return to BR tags, but is 
there a PHP function that will add BR or P tags to a text form field in place of 
the carriage returns a user might add.

Thanks in advance!
-NorthBayShane

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




[PHP] MUST READ: ALL MySQL Newbies!

2002-09-19 Thread Shane

If you are a MySQL newbie you need to read this!

I just screwed up big time and lost about 1 hour of data in a time sensitive 
application by using TINYINT as my ID field.

TINYINT will only allow up to 255 records in a MySQL DB. Please, if you don't know the 
EXACT differences between all the different INTEGER types, please stop what you are 
doing and go to mysql.com and read up. You may be surprised that the number you enter 
after your INT(10) has nothing to do with what you think it means.

Ever wish someone could let you know ahead of time that you are about to screw up? 
Well this could be it. Please learn from my mistake, fully understand INTEGER types if 
you ever plan on having a DB grow above 200+ records.

Thanks crew.
- name withheld... too embarrassed right now.

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




[PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

One of my pages opens ~100 files, reads from them, and closes them, (only one 
file open at a time).

The problem is that the page just dies mid-way through execution - no errors, 
no segfault, it just dies and returns a blank page to the user.  the problem 
goes away if I reduce the number of files accessed.

its a build of PHP 4.1.2 on Linux running as an Apache module,  (if it makes 
any odds, the configure line is below).

I can't see anything on bugs.php.net about this - has anyone seen this before 
(and, of course, the crucial question; what can I do to fix it?)

Any help appreciated,

Thanks

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc


 './configure' '--with-gd' '--enable-gd-native-ttf' '--enable-track-vars' 
'--enable-sysvsem' '--enable-sysvshm' '--enable-calendar' '--with-zlib' 
'--prefix=/opt/php-4.1' '--with-config-file-path=/usr/local/etc/httpd/conf' 
'--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr' 
'--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml' 
'--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp' '--with-ttf' 
'--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl' 
'--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6' 
'--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr' 
'--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr' 
'--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv' '--with-kerberos' 
'--enable-xslt' '--with-xslt-sablot' '--with-freetype-dir=/usr' 
'--with-apxs=/usr/sbin/apxs'
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3
STUVeNEID6bzu4+hq+PqCI4=
=zZqL
-END PGP SIGNATURE-


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




Re: [PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Thanks for the input - but its definately not that; time limit is set to 600 
seconds and it dies inside 1 second :(

(i should have added this to the original mail, but it seems to supply the 
page but keep the connection open, strange...)

S

On Wednesday 18 September 2002 12:01 am, Tyler Longren wrote:
 How long does the script tend to run before it just quits?  Perhaps
 a timeout is set too low in php.ini.

 Take a look at max_execution_time in php.ini

 tyler

 On Tue, 17 Sep 2002 23:14:46 +0100

 Shane Wright [EMAIL PROTECTED] wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Hi
 
  One of my pages opens ~100 files, reads from them, and closes them,
  (only one file open at a time).
 
  The problem is that the page just dies mid-way through execution - no
  errors, no segfault, it just dies and returns a blank page to the
  user.  the problem goes away if I reduce the number of files accessed.
 
  its a build of PHP 4.1.2 on Linux running as an Apache module,  (if it
  makes any odds, the configure line is below).
 
  I can't see anything on bugs.php.net about this - has anyone seen this
  before (and, of course, the crucial question; what can I do to fix
  it?)
 
  Any help appreciated,
 
  Thanks
 
  - --
  Shane
  http://www.shanewright.co.uk/
  Public key: http://www.shanewright.co.uk/files/public_key.asc
 
 
   './configure' '--with-gd' '--enable-gd-native-ttf'
   '--enable-track-vars'
  '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar'
  '--with-zlib' '--prefix=/opt/php-4.1'
  '--with-config-file-path=/usr/local/etc/httpd/conf'
  '--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr'
  '--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml'
  '--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp'
  '--with-ttf' '--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl'
 
  '--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6'
  '--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr'
  '--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr'
  '--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv'
  '--with-kerberos' '--enable-xslt' '--with-xslt-sablot'
  '--with-freetype-dir=/usr' '--with-apxs=/usr/sbin/apxs'
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.0.7 (GNU/Linux)
 
  iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3
  STUVeNEID6bzu4+hq+PqCI4=
  =zZqL
  -END PGP SIGNATURE-
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9h8Q85DXg6dCMBrQRApEbAKCIewL9fgwPT1ey3byL2t2pg1BPRACfWJwN
rUT+B2yFqGn6e2IO3XAGqeM=
=qz1m
-END PGP SIGNATURE-


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




Re: [PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

my ISP keeps a little behind the curve - sometimes thats a good thing, but 
sometimes not.  :(

We could install our own PHP, but unless this is a known issue that has been 
fixed since I'd rather not risk any others by installing a new version (and 
having to deal with the update issues that causes with my ISPs updates)

Thanks

Shane

On Wednesday 18 September 2002 1:20 am, [EMAIL PROTECTED] wrote:
 Can't you upgrade to 4.2.3 many bugs were fixed.

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9h8gz5DXg6dCMBrQRArHKAJ4w3TjYJpI4ZaRSIi1cXWqOj7DzdwCgu1et
ofTLnvU/I9C4RQMNnpvwXIY=
=JLHf
-END PGP SIGNATURE-


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




[PHP] Easy Function Question?

2002-09-10 Thread Shane

I have a need to call a function, where all the variables used might not be set. Is 
there a way to have a variable in a function have a default setting if the variable 
passed to the function is VOID?

EXAMPLE:

$name=me;
$phone=;
//$zip is VOID

function myFunction($name, $phone, $zip){
 echo $name.$phone.$zip
}

can I write...?

function myFunction($name, $phone, $zip=){
 echo $name.$phone.$zip
}

and then $zip will have a value of  if $zip is VOID for some reason...?

I thought it was something like this, but I keep batting ZERO and there is no mention 
of this problem in the places I looked in the docs.

Can anyone throw me a bone?
Thanks gang!

-NorthBayShane

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




RE: [PHP] Easy Function Question?

2002-09-10 Thread Shane

Martin, so if I write...

function myFunction($name, $phone, $zip=){
 echo $name.$phone.$zip
}

and $zip is NOT SET then $zip will = .
But if $zip IS SET then $zip will = whatever $zip's current value is, and will NOT be 
changed to ?

Please advise.
Thanks Martin

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 5:14 PM
To: Shane; [EMAIL PROTECTED]
Subject: RE: [PHP] Easy Function Question?


function myFunction($name, $phone, $zip=){
 echo $name.$phone.$zip
}

is the corrent format, but if you call it like this:

myFunction(name, phone, null);

then $zip will equal null, not 
something like this might help

function myFunction($name, $phone, $zip=){
 if (!$zip)  $zip = ;
 echo $name.$phone.$zip
}

HTH
Martin

-Original Message-
From: Shane [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 10:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Easy Function Question?


I have a need to call a function, where all the variables used might not be
set. Is there a way to have a variable in a function have a default setting
if the variable passed to the function is VOID?

EXAMPLE:

$name=me;
$phone=;
//$zip is VOID

function myFunction($name, $phone, $zip){
 echo $name.$phone.$zip
}

can I write...?

function myFunction($name, $phone, $zip=){
 echo $name.$phone.$zip
}

and then $zip will have a value of  if $zip is VOID for some reason...?

I thought it was something like this, but I keep batting ZERO and there is
no mention of this problem in the places I looked in the docs.

Can anyone throw me a bone?
Thanks gang!

-NorthBayShane

-- 
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] Simple one... Please look.

2002-08-30 Thread Shane

Greetings. Can someone please enlighten me on the best way to get information from a 
comma delimited file, to a variable?

Example. A client updates a comma delimited list of names to a directory on a server, 
my script would need to read in the entire list and turn it into a variable.

Once it is in a variable, I can use explode() to parse it into an array.

But how would I read that document? fopen()

Thanks in advance friends.
-NorthBayShane

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




[PHP] UPS Ship Rates avail? XML?

2002-08-21 Thread Shane
Anyone know if there is a place I can query US shipping rates from say UPS or FedEx?
Possibly through Amazon's API?

Thanks in Advance!!!
-NorthBayShane

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


[PHP] Pls Help: Quickie: set_time_limit

2002-08-13 Thread Shane

Question friends...Sorry to bug, but the documentation wasn't too clear.

When using set_time_limit() to override the default PHP time limit. Is this syntax 
tacked on to the end of a QUERY?

ALA
mysql_select_db(files, $db, set_time_limit(0));

I have an upload page that is farting out when the 30 second time limit is reached. I 
am using a mySQL query to store my binary files in a DB. Is the above code snippet the 
proper syntax to use set_time_limit()?

Or am I just high on crack?
Thanks for your help gang.
- NorthBayShane

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




[PHP] HELP with fOpen

2002-08-02 Thread Shane

No lock in the archives, so here it goes...
Greetings all, I am using fOpen to try and create a new file in a local directory on a 
remote server. Each time I run my script is says PERMISSION DENIED but the sys admin 
swears the entire directory is set to 777.

Does anyone know if a setting has to be set in PHP for dynamic file creation to take 
place?
I can use fOpen to read a file, I just cant write without the above error.

Please, any help is appreciated, my deadline is looming.

Thanks
- NorthBayShane

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




RE: [PHP] PHP and MySQL

2002-08-02 Thread Shane

-Original Message-
here any way to speed up MySQL queries?
--
Sure, ask for only the data you need. or halt your query when you have what you need.

HTH

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




RE: [PHP] Email failure????

2002-08-02 Thread Shane

Yes Scott, I get that too. But hey, it's friday!

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




[PHP] Best way to save?

2002-08-01 Thread Shane

Besides using fOpen to save the output of a script to a file, What would be your best 
recommendation for a way to save the output of a PHP script to an HTML doc. Images 
will be included.

Thanks gang.
- NorthBayShane

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




[PHP] Favorite Calendar Anyone?

2002-08-01 Thread Shane

Anyone have a favorite Calendar script out there they would like to share?

- NorthBayShane

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




[PHP] Help with fopen please.

2002-07-31 Thread Shane

Looked in the archive and manual and came up with no luck, so here it goes.

My end result is to save the output of a PHP script as an HTML file in a specified 
directory on a WIN2K server.

my script is such...
? PHP
function save_archive(){
$filename = http://myserver.net/extranet/archive.php?jobid=1;;  
$fd = fopen( $filename, r ); 
$fd2 = fopen(ftp://me:[EMAIL PROTECTED]/extranet/test2.html;, w);

while (!feof($fd)) { 
$line = fgets($fd, 1024); 
fputs($fd2,$line); 
} 

fclose($fd); 
fclose($fd2); 
}
?

I'm having a terrible time getting this to work. Is there a better way? Or can someone 
point me toward or post an example of some working function I could study???

Thanks so much my friends!
- NorhthBayShane

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




[PHP] HELP: COM(CDO.Message)HTML vs TEXT

2002-07-23 Thread Shane

Greetings PHPers. For those of you with MS COM experience or those who want to know 
how to send a MULTI MIME type message read on.

I'm trying to find out the syntax for sending an HTMLbody and TEXTbody in the same 
message thus making it a TRUE MULTI message. (see code)

This is what I have... what am I doing wrong??? Any Clues?

$message = new COM('CDO.Message');
$message-To = $myList[$i];
$message-From = '[EMAIL PROTECTED]';
$message-Subject 'My Subject Line';
$message-TEXTBody = This is my plain Text Body!
$message-HTMLBody = htmlHTML STRING HERE/html;
$message-Send();

Do I need to declare the HTML body first?
Do I have to set the AutoGeneratedTextBody property to false?
Commenting out the TEXTBody line sends a auto generated text body by default, but I 
was hoping to be able to customize my TEXTBody with a bit more control.

Your comments are always GREATLY appreciated.
Thanks gang!
- NorthBayShane

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




RE: [PHP] HELP: COM(CDO.Message)(SOLVED!!!)

2002-07-23 Thread Shane

Placing the line
$message-TEXTBody = This is my plain Text Body!
AFTER your HTMLBody tag did the trick.

Try it out Solved my own problem, but I hope this helps someone else out.

-Original Message-
From: Shane 
Sent: Tuesday, July 23, 2002 12:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] HELP: COM(CDO.Message)HTML vs TEXT


Greetings PHPers. For those of you with MS COM experience or those who want to know 
how to send a MULTI MIME type message read on.

I'm trying to find out the syntax for sending an HTMLbody and TEXTbody in the same 
message thus making it a TRUE MULTI message. (see code)

This is what I have... what am I doing wrong??? Any Clues?

$message = new COM('CDO.Message');
$message-To = $myList[$i];
$message-From = '[EMAIL PROTECTED]';
$message-Subject 'My Subject Line';
$message-TEXTBody = This is my plain Text Body!
$message-HTMLBody = htmlHTML STRING HERE/html;
$message-Send();

Do I need to declare the HTML body first?
Do I have to set the AutoGeneratedTextBody property to false?
Commenting out the TEXTBody line sends a auto generated text body by default, but I 
was hoping to be able to customize my TEXTBody with a bit more control.

Your comments are always GREATLY appreciated.
Thanks gang!
- NorthBayShane

-- 
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] MySQL equivalent to append?

2002-07-23 Thread Shane

Greetings, is there a mySQL syntax command equivalent to appending information to a 
text record.

If I wanted to add an email value to a text record that already has an email value in 
it, is there a faster way to do this than reading the original value, combining the 
new value to it, and then running an UPDATE command?

- Thanks

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




[PHP] MAIL() Trouble. Need your eyes.

2002-07-11 Thread Shane

Greetings, I am attempting to send an HTML based email using the Mail() function in 
PHP.

I am having great luck until I include an OBJECT or EMBED tag in the HTML string.

I am running PHP 4.2.1 on a WIN NT client.

If I uncomment the OBJECT or EMBED lines below in the $message variable, my script 
errors out on the MAIL() call at the bottom.

Please, any help would be appreciated.
Thanks folks!

- NorthBayShane
-
?PHP
$myname = Me Myself;
$myemail = [EMAIL PROTECTED];
$myreplyemail = [EMAIL PROTECTED];
$contactname = Mister Contact;
$contactemail = [EMAIL PROTECTED];

---
MY VERY LONG $MESSAGE STRING
---

$message = htmlheadtitle/title;
$message.= meta http-equiv='Content-Type' content='text/html; 
charset=iso-8859-1'/head;
$message.= body bgcolor='#54616E' text='#FF' link='#FF6600' vlink='#99' 
alink='#FF9900';
$message.= centertable width='501' border='0' cellspacing='0' 
cellpadding='0'trtd width='500' 
background='http://www.delaplaine.net/flashmail/noflash.gif';

--
HERE IS WHERE THE TROUBLE STARTS
IF I UNCOMMENT THE OBJECT OR EMBED TAG
THE SERVER ERRORS OUT ON MY MAIL() CALL
--

//$message.= pobject classid='clsid:D27CDB6E-AE6D-11cf-96B8-44455354' 
codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'
 width='500' height='300'param name=movie 
value='http://www.delaplaine.net/flashmail/delaplaine.swf'param name=quality 
value=highparam name=menu value=falseparam name='BGCOLOR' value='#54616E';
//$message.= embed src='http://www.delaplaine.net/flashmail/delaplaine.swf' 
quality=high 
pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'
 type='application/x-shockwave-flash' width='500' height='300' 
bgcolor='#54616E'/embed;
//$message.= /object/p;

--
HERE IS WHERE THE TROUBLE ENDS
--
$message.= /td;
$message.= td bgcolor='#54616E'img 
src='http://www.delaplaine.net/flashmail/spacer.gif' width='1' 
height='300'/td/tr;
$message.= trtd align='center'pbr/ppfont face='Verdana, Arial, 
Helvetica, sans-serif' size='1'a 
href='http://www.delaplaine.net/extranet/fm.php?sec=newid=noflash'Click here/a if 
you cannot see the animation above./font/ppfont face='Verdana, Arial, 
Helvetica, sans-serif' size='1' color='#99'copy; Copyright 2002, Delaplaine 
Creative.br All rights reserved./font/p/tdtd align='center'nbsp;/td/tr;
$message.= /tablepnbsp;/p/center;
$message.= /body/html;

$subject = FlashMail Test;
$headers = MIME-Version: 1.0\r\n;
$headers.= Content-type: text/html; charset=iso-8859-1\r\n;
$headers.= From: .$myname..$myemail.\r\n;
$headers.= To: .$contactname..$contactemail.\r\n;
$headers.= Reply-To: .$myname.$myreplyemail\r\n;
$headers.= X-Priority: 1\r\n;
$headers.= X-MSMail-Priority: High\r\n;
$headers.= X-Mailer: Just My Server;

mail($contactemail, $subject, $message, $headers);

?

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




RE: [PHP] MAIL() Trouble. Need your eyes.

2002-07-11 Thread Shane

I'll give it a shot, but there are # symbols all over the place in the other tags 
(like COLOR links...etc...

But thanks though?
Anyone else???

Thanks folks!

-Original Message-
From: Paul Roberts [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 11:31 AM
To: Shane
Subject: Re: [PHP] MAIL() Trouble. Need your eyes.


try escaping the # in there.


Paul Roberts
[EMAIL PROTECTED]



- Original Message - 
From: Shane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 11, 2002 7:21 PM
Subject: [PHP] MAIL() Trouble. Need your eyes.


Greetings, I am attempting to send an HTML based email using the Mail() function in 
PHP.

I am having great luck until I include an OBJECT or EMBED tag in the HTML string.

I am running PHP 4.2.1 on a WIN NT client.

If I uncomment the OBJECT or EMBED lines below in the $message variable, my script 
errors out on the MAIL() call at the bottom.

Please, any help would be appreciated.
Thanks folks!

- NorthBayShane
-
?PHP
$myname = Me Myself;
$myemail = [EMAIL PROTECTED];
$myreplyemail = [EMAIL PROTECTED];
$contactname = Mister Contact;
$contactemail = [EMAIL PROTECTED];

---
MY VERY LONG $MESSAGE STRING
---

$message = htmlheadtitle/title;
$message.= meta http-equiv='Content-Type' content='text/html; 
charset=iso-8859-1'/head;
$message.= body bgcolor='#54616E' text='#FF' link='#FF6600' vlink='#99' 
alink='#FF9900';
$message.= centertable width='501' border='0' cellspacing='0' 
cellpadding='0'trtd width='500' 
background='http://www.delaplaine.net/flashmail/noflash.gif';

--
HERE IS WHERE THE TROUBLE STARTS
IF I UNCOMMENT THE OBJECT OR EMBED TAG
THE SERVER ERRORS OUT ON MY MAIL() CALL
--

//$message.= pobject classid='clsid:D27CDB6E-AE6D-11cf-96B8-44455354' 
codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'
 width='500' height='300'param name=movie 
value='http://www.delaplaine.net/flashmail/delaplaine.swf'param name=quality 
value=highparam name=menu value=falseparam name='BGCOLOR' value='#54616E';
//$message.= embed src='http://www.delaplaine.net/flashmail/delaplaine.swf' 
quality=high 
pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'
 type='application/x-shockwave-flash' width='500' height='300' 
bgcolor='#54616E'/embed;
//$message.= /object/p;

--
HERE IS WHERE THE TROUBLE ENDS
--
$message.= /td;
$message.= td bgcolor='#54616E'img 
src='http://www.delaplaine.net/flashmail/spacer.gif' width='1' 
height='300'/td/tr;
$message.= trtd align='center'pbr/ppfont face='Verdana, Arial, 
Helvetica, sans-serif' size='1'a 
href='http://www.delaplaine.net/extranet/fm.php?sec=newid=noflash'Click here/a if 
you cannot see the animation above./font/ppfont face='Verdana, Arial, 
Helvetica, sans-serif' size='1' color='#99'copy; Copyright 2002, Delaplaine 
Creative.br All rights reserved./font/p/tdtd align='center'nbsp;/td/tr;
$message.= /tablepnbsp;/p/center;
$message.= /body/html;

$subject = FlashMail Test;
$headers = MIME-Version: 1.0\r\n;
$headers.= Content-type: text/html; charset=iso-8859-1\r\n;
$headers.= From: .$myname..$myemail.\r\n;
$headers.= To: .$contactname..$contactemail.\r\n;
$headers.= Reply-To: .$myname.$myreplyemail\r\n;
$headers.= X-Priority: 1\r\n;
$headers.= X-MSMail-Priority: High\r\n;
$headers.= X-Mailer: Just My Server;

mail($contactemail, $subject, $message, $headers);

?

-- 
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] MAIL() Trouble. Need your eyes.

2002-07-11 Thread Shane

Nope, no luck. Still errors out.
Is there a limit to how man characters a MAIL() call can have?

-Original Message-
From: Paul Roberts [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 11:31 AM
To: Shane
Subject: Re: [PHP] MAIL() Trouble. Need your eyes.


try escaping the # in there.


Paul Roberts
[EMAIL PROTECTED]



- Original Message - 
From: Shane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 11, 2002 7:21 PM
Subject: [PHP] MAIL() Trouble. Need your eyes.


Greetings, I am attempting to send an HTML based email using the Mail() function in 
PHP.

I am having great luck until I include an OBJECT or EMBED tag in the HTML string.

I am running PHP 4.2.1 on a WIN NT client.

If I uncomment the OBJECT or EMBED lines below in the $message variable, my script 
errors out on the MAIL() call at the bottom.

Please, any help would be appreciated.
Thanks folks!

- NorthBayShane
-
?PHP
$myname = Me Myself;
$myemail = [EMAIL PROTECTED];
$myreplyemail = [EMAIL PROTECTED];
$contactname = Mister Contact;
$contactemail = [EMAIL PROTECTED];

---
MY VERY LONG $MESSAGE STRING
---

$message = htmlheadtitle/title;
$message.= meta http-equiv='Content-Type' content='text/html; 
charset=iso-8859-1'/head;
$message.= body bgcolor='#54616E' text='#FF' link='#FF6600' vlink='#99' 
alink='#FF9900';
$message.= centertable width='501' border='0' cellspacing='0' 
cellpadding='0'trtd width='500' 
background='http://www.delaplaine.net/flashmail/noflash.gif';

--
HERE IS WHERE THE TROUBLE STARTS
IF I UNCOMMENT THE OBJECT OR EMBED TAG
THE SERVER ERRORS OUT ON MY MAIL() CALL
--

//$message.= pobject classid='clsid:D27CDB6E-AE6D-11cf-96B8-44455354' 
codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'
 width='500' height='300'param name=movie 
value='http://www.delaplaine.net/flashmail/delaplaine.swf'param name=quality 
value=highparam name=menu value=falseparam name='BGCOLOR' value='#54616E';
//$message.= embed src='http://www.delaplaine.net/flashmail/delaplaine.swf' 
quality=high 
pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'
 type='application/x-shockwave-flash' width='500' height='300' 
bgcolor='#54616E'/embed;
//$message.= /object/p;

--
HERE IS WHERE THE TROUBLE ENDS
--
$message.= /td;
$message.= td bgcolor='#54616E'img 
src='http://www.delaplaine.net/flashmail/spacer.gif' width='1' 
height='300'/td/tr;
$message.= trtd align='center'pbr/ppfont face='Verdana, Arial, 
Helvetica, sans-serif' size='1'a 
href='http://www.delaplaine.net/extranet/fm.php?sec=newid=noflash'Click here/a if 
you cannot see the animation above./font/ppfont face='Verdana, Arial, 
Helvetica, sans-serif' size='1' color='#99'copy; Copyright 2002, Delaplaine 
Creative.br All rights reserved./font/p/tdtd align='center'nbsp;/td/tr;
$message.= /tablepnbsp;/p/center;
$message.= /body/html;

$subject = FlashMail Test;
$headers = MIME-Version: 1.0\r\n;
$headers.= Content-type: text/html; charset=iso-8859-1\r\n;
$headers.= From: .$myname..$myemail.\r\n;
$headers.= To: .$contactname..$contactemail.\r\n;
$headers.= Reply-To: .$myname.$myreplyemail\r\n;
$headers.= X-Priority: 1\r\n;
$headers.= X-MSMail-Priority: High\r\n;
$headers.= X-Mailer: Just My Server;

mail($contactemail, $subject, $message, $headers);

?

-- 
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] Help a Header Headache!!

2002-07-11 Thread Shane

I am trying to send an EMBED and OBJECT tag inside an HTML email using the mail() call.
 My HEADER Content type is...

$headers = MIME-Version: 1.0\r\n;
$headers.= Content-type: text/html; charset=iso-8859-1\r\n;
$headers.= From: .$myname..$myemail.\r\n;
$headers.= To: .$contactname..$contactemail.\r\n;
$headers.= Reply-To: .$myname.$myreplyemail\r\n;
$headers.= X-Priority: 1\r\n;
$headers.= X-MSMail-Priority: High\r\n;
$headers.= X-Mailer: Just My Server;

mail($contactemail, $subject, $message, $headers);

Each Time I add the EMBED or OBJECT tag, the mail() call errors out.
What type of content-type do I need to use to be able to send EMBED tags through an 
HTML email in PHP?

Please help, I have had no luck with the manual or my archives.

Thanks folks.
- NorthBayShane

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




[PHP] Best String to Array Solution

2002-07-11 Thread Shane

Greetings, this may be simple, but it's late and my brain needs a hand.

I have a string such as first,second,third,fourth

I need a way to take each one of the items separated by the comma to be an item in an 
array.

I tried ereg() but to no avail. Is there a simpler way to do it?
Thanks gang!

Chaka Loves You!

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




RE: [PHP] HELP!!! Word count

2002-07-11 Thread Shane

Dan, if you are entering the words in a form, when the variable holding the string 
hits your script do something like this (Hey I just figured this out myself too

Gotta love these lists

$tmpStr= whatever the form passes your script
// turn string into an array
// use EXPLODE() to seperate the words into an array
// since they are seperated by a   (blank space)
$tmpAry = explode(' ',$tmpStr);
// if they were seperated by commas you would write
$tmpAry = explode(',',$tmpStr); // DIG
// then just use count($tmpAry) to figure out the size of your array
// and you have the number of words!

There might be an easier way than that, but it workes for me.
-Peace dude
PS: Thank Andrew Braund for the solution, he sent a varriant of it to me

That's two people you helpes Andrew!
YOU RULE!!!

- NorthBayShane
-Original Message-
From: Peter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 6:20 PM
To: Dan McCullough; PHP General List
Subject: RE: [PHP] HELP!!! Word count


if i remember correctly there was something on word counts posted in the last week or 
or .. maybe even last couple days... have a scroll thru and u will find it :)

 -Original Message-
 From: Dan McCullough [mailto:[EMAIL PROTECTED]]
 Sent: Friday, 12 July 2002 11:08 AM
 To: PHP General List
 Subject: [PHP] HELP!!! Word count
 
 
 I have some clients who want to charge a flat rate for words 
 entered, but over a certain number of
 words there is an additional charge, to complicate matters there 
 is an option/addon where you can
 bold the lines, and there is a charge per line, so you have to 
 calculate the total number of lines
 based on character total.
 
 Anyone know of way to accomplish this, I know that it will have 
 to be done in seperate ways.  but
 does anyone have an idea or two .. hlp 
 
 thanks,
 
 dan
 
 __
 Do You Yahoo!?
 Sign up for SBC Yahoo! Dial - First Month Free
 http://sbc.yahoo.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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




Re: [PHP] Dos Paths

2002-07-10 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi 

I have a problem that's somewhat related to this - I can get short filenames 
from the OS but I really need long filenames.  Does anyone know how to do 
this?

Thanks

Shane


On Wednesday 10 July 2002 1:14 pm, BB wrote:
 I've got an application that requires dos folder names (8.3 standard) as
 input.

 I also have PHP, which quite happily can cope with both.

 Can someone help me write a function to translate full paths to dos paths

 Thanks

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9LEBu5DXg6dCMBrQRAk7bAKCS10F8NjFrStSaha0Dkno0uwGE0QCgjdFi
gNzKf3kaWjP5h2rWtImS6Xw=
=I22O
-END PGP SIGNATURE-


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




[PHP] mySQL time = year 2038 [HELP]

2002-07-01 Thread Shane

Checked the archive and saw no difinitives... so... How come when I query my clients 
mySQL DB and use NULL or NOW() as my default in a TIMESTAMP record that it always 
comes up Jan 18, 2038?

Is the clock not set properly, or am I misunderstanding some basic principal of the 
time stamp?

My clients version pf PHP is 4+ on a Windows IIS server.

Any clues???
Thanks
-NorthBayShane

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




RE: [PHP] mySQL time = year 2038 [SOLVED]

2002-07-01 Thread Shane

Yep, I was using the DATE() function in PHP to convert a TIMESTAMP from a MySQL DB 
query. I was getting a year of 2038 because MySQL and PHP use different TIMESTAMP 
formats.

There are several FUNCTIONS that convert the two TIMESTAMPS from one to the other, 
(see comments in PHP manuals) but I wound up using the call from a mySQL query to 
convert the data.

much like this
// GET CONVERTED MYSQL TIME TO UNIX TIME
$getmyTime = mysql_query(SELECT UNIX_TIMESTAMP(timestamp_col) AS yournamehere 
FROM myDBnamehere WHERE id = $whatever)
 or die(Invalid query);
 $mysqlTime = mysql_result($getmyTime, 0, 0);
// TURN TIME INTO VIEWABLE STRING
 $myTime = date(F j, Y  @ h:i A, $mysqlTime). EST;

This spits back July 1, 2002 @ 04:41 PM EST instead of some year in 2038 when I did 
the same thing without the SELECT UNIX_TIMESTAMP query.

Thanks again for all your replies.
PHP RULES! (insert white boy dance here)
- NorthBayShane


-Original Message-
From: Shane 
Sent: Monday, July 01, 2002 9:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] mySQL time = year 2038 [HELP] 


Checked the archive and saw no difinitives... so... How come when I query my clients 
mySQL DB and use NULL or NOW() as my default in a TIMESTAMP record that it always 
comes up Jan 18, 2038?

Is the clock not set properly, or am I misunderstanding some basic principal of the 
time stamp?

My clients version pf PHP is 4+ on a Windows IIS server.

Any clues???
Thanks
-NorthBayShane

-- 
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] Best Delete Confirmation Script

2002-06-27 Thread Shane

Greetings.

I would like your opinions on the best way to implement an Are You Sure You Want To 
Do This? dialog for an Admin user when they go to delete a record in a DB.

Do you find that a whole page is usually required for this, or does anyone have any 
nice pop up solutions for such a query.

Sure... I hate doing these things too, but when Joe Big Boss gets a bit trigger happy 
and kills some data he mistakenly thought was a different record. You KNOW who is 
going to hear about it from on high.  :^)

Thanks gang!
- NorthBayShane

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




[PHP] Image GD Wizardry!

2002-06-26 Thread Shane

One would think that pulling binary data from a DB using the function 
imageCreateFromString would allow you to output that string to any format. (GIF JPEG 
PNG) or whatever is supported by your version of GD.

But this code flakes out and creates no image if it reads from a binary file made by a 
GIF file. (works great for JPEGs!!)

Anyone see what the problem might be? Or know of any way to output a JPEG or PNG from 
a binary GIF file in a mySQL DB?

Theory code only...

1. Query binary string from DB
2. Create Image From String
3. Scale your image to fit the size you need.
4. Use ImageCreateTrueColor to create your compatible background square
5. Fill it with your background color using ImageFilledRectangle
6. Use ImageCopyResampled to place your Image from String onto you background image
7. use imageJpeg to output your true color image as a JPEG

Since this works great as JPEG IN, JPEG OUT, but does NOT work when GIF is the source, 
is this because ImageCopyResampled can't use the GIF image?

If so, anyone have a nice code snippet that will turn client uploads from GIFs into 
JPEGS?

- Thanks in advance folks, I realize this is a tough one, and any suggestions are 
always greatly appreciated, and as always I will post my final solution for the 
archives.

Thanks again.
-NorthBayShane

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




[PHP] GD Questions: Please help.

2002-06-13 Thread Shane

Greetings fellow PHPers.

I am learning basic GD functionality and I have a few YES/NO questions to ask.
This should only take a few seconds of your time. PLEASE HELP!

So far I have seen several tutorials on creating graphics on the fly.
In each example the either send the image (by itself) to a browser (using the HEADER 
line) or they save it to a directory.

Can I send an image to a browser along with other HTML and PHP information, or does my 
image have to be on it's own.

If I want to send my image to a browser with other HTML do I have to save it to a file 
first?

Does my directory that I am writing to have to have write permission set to TRUE for 
me to create an image file? and if it is NOT, will I get an error something like...
Warning: imagejpeg: unable to open '/images/test.jpg' for writing!

Can anyone show me a chunk of sample code or function that shows how I can embed my 
images created on the fly into my normal HTML files.

As always, thanks in advance my friends.

- NorthBayShane

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




RE: [PHP] GD Questions: Please help.

2002-06-13 Thread Shane

Kevin... YOU RULE!!!

A million billion Humble thanks!

So simple, yet was such a pain to get past. I was racking my brain on that one!
Man, if I could just buy you a beer online, I would.

THANK YOU THANK YOU THANK YOU!
- NorthBayShane

BUT...Does this mean I will need a separate PHP page for every graphic script?
You would think there would be a way to call it from a function.

(Thinking out loud now...)
But I suppose I could send a variable along with my img src=getimage.php tag like

img src=getimage.php?id=123

and then when the PHP code in getimage.php compares the variable passed to it's 
library of code snippets it would spit back the necessary image each time.

H
Is there a better way?

-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 1:34 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] GD Questions: Please help.


Shane, absolutely you can mix HTML and dynamically generated images.  You'll
actually call the image in passively via an img tag like this...

img src=getimage.php

getimage.php will echo the appropriate image header (Content-type: image/png
or whatever) plus your image grabbing/generating code which you will simply
output to the browser.  Deceptively easy, yes?  :)

Hope this helps.
-Kevin


- Original Message -
From: Shane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 2:21 PM
Subject: [PHP] GD Questions: Please help.


 Greetings fellow PHPers.

 I am learning basic GD functionality and I have a few YES/NO questions to
ask.
 This should only take a few seconds of your time. PLEASE HELP!

 So far I have seen several tutorials on creating graphics on the fly.
 In each example the either send the image (by itself) to a browser (using
the HEADER line) or they save it to a directory.

 Can I send an image to a browser along with other HTML and PHP
information, or does my image have to be on it's own.

 If I want to send my image to a browser with other HTML do I have to save
it to a file first?

 Does my directory that I am writing to have to have write permission set
to TRUE for me to create an image file? and if it is NOT, will I get an
error something like...
 Warning: imagejpeg: unable to open '/images/test.jpg' for writing!

 Can anyone show me a chunk of sample code or function that shows how I can
embed my images created on the fly into my normal HTML files.

 As always, thanks in advance my friends.

 - NorthBayShane

 --
 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] Thumbnails from mySQL binary data

2002-06-12 Thread Shane

Greetings, I just started playing with the GD functions. (FUN!!!) And I am looking for 
advice or scripts on how to turn binary data from my DB into thumbnails.

I understand how to make thumbnails from existing images already sitting in a 
directory, but how can I get a scaled image to be made directly from the binary data 
in my DB.

Your guidance or advice would be most helpful and TRULY appreciated.

As always, my final functions will be posted for all.
Thanks in advance my friends!!!

- NorthBayShane

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




[PHP] GD imagecreatefromstring ADVICE??

2002-06-12 Thread Shane

Anyone have any opinions or real world experience using the function 
imagecreatefromstring?

Not much out there on the web? I am looking for the best method for making 
thumbnails from my binary DB data.

Thanks again group!!!
- NorthBayShane

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




Re: [PHP] Help with header function

2002-06-11 Thread Shane Kelly

LOL...thanks ed...figured it out last night...
don't need to do a file_exists

since i capture file_name in my db...I do a query before the insert to see
if the file_name entered in the form, matches any of the file_names stored
in mySQL.  if the count of the record set  0 then the file exists, and
redirect using header: Location...etc,etc.

If count=0 then insert form contents into docuemnt and copy file to folder.

Thanks

Shane
Ed Lazor [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 LOL  Yea, it's always much easier if we have actual code to work from
rather
 than taking guesses in the dark.

 -Original Message-
 Why do I get the feeling I'm playing that mind bender game where you
have
 to guess the right combination within so many turns?  LOL



 This message is intended for the sole use of the individual and entity to
 whom it is addressed, and may contain information that is privileged,
 confidential and exempt from disclosure under applicable law.  If you are
 not the intended addressee, nor authorized to receive for the intended
 addressee, you are hereby notified that you may not use, copy, disclose or
 distribute to anyone the message or any information contained in the
 message.  If you have received this message in error, please immediately
 advise the sender by reply email and delete the message.  Thank you very
 much.




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




[PHP] Re: mysql problems, need help quick

2002-06-11 Thread Shane Kelly

not on auto increment...thats the point!
why would you need to get the #6 back anyway...

this is the fundementals of database theory... chances are the database is
using this autoincrement field as the PRIMARY KEY...in which case no
duplicates are allowed..

In terms of records...your id#7 has become record #6.

I can't think of any reason why loosing the #6 should affect anything you
want to do.

XXx
Hawk [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm filling a database with info, and I'm using id as identifiers in the
 list, the id is auto increment, and I deleted one entry, now I have a hole
 in the database, is there any way to fix this?
 lets say I have
 1
 2
 3
 4
 5
 6
 And I deleted 6
 Now it looks like
 1
 2
 3
 4
 5
 7
 8
 9 and so on

 is there somewhere the next number is located ?






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




[PHP] Re: Newbie needs some help picking a php editor.

2002-06-11 Thread Shane Kelly

Hi Al...

I use Macromedia Dreamweaver UltraDev with PHAkt plugin (you'll have to add
it from the dreamweaver ultradev extensions @ www.macromedia.com/exchange

Macromedia UltraDev is available for 30 day free trial at their site

it has brilliant php support..you barely have to know a stitch of code, but
it helps.

There are also other PHP extensions available at macromedia exchange.

check out www.php.net
they talk about other possible resources...but I love ultradev.





Al [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I spent a good bit of time looking at editors to help me prepare and
 modify php scripts.  I've found it very time consuming to evaluate them.

 In general, I've found you have to download, install and play with them
 some just to determine if they fit your needs.  And I know from
 experience, often programs only show their deficiencies after you've
 used them a bit.

 And, I've found many that claim php editing; but they really aren't
 anything but a simple plain text editor.

 My needs are modest.  I'm well versed with HTML, css, etc.  And have
 done a bit of customizing scripts.

 For now, I mostly need an editor that will:
   Help me keep the syntax correct.
   Provide a list of functions, etc. to pick from.
   Upload my script files via ftp.
   Have the usual search/replace across files

 Would be nice if it:
   Had a project feature
   Could run a script I'm working on locally with its includes, etc. on
 my remote host.

 Right now I'm looking at php Coder Pro; phpEdit and UltraEdit.

 Can anyone comment on these?  And please suggest any others.

 Thanks.




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




[PHP] get pwd on windows

2002-06-11 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

Ok, I need to write this little script to run on a Windows box (don't ask...), 
but I'm getting completely shafted by the inconsistent use of long filenames.

I need to get the current directory, but it must have long filenames and not 
be chopped to xxx~1 or anything.   $SCRIPT_FILENAME is not set, there is no 
pwd utility, nothing is set in the environment and realpath('./') returns 
cropped firectory names.

Is there a way to do this or am I condemned to bang my head against a wall and 
swear some more?

Cheers

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9Bjcw5DXg6dCMBrQRAjjbAJ4iz2jRJ5rMzkV7Md5GHpTd3YcX1wCfZb6B
44Qwj0u6jdfNpGtf+LTEX+w=
=HgUp
-END PGP SIGNATURE-


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




[PHP] Re: multi-line textfields don't post

2002-06-10 Thread Shane Kelly

Do you mean the data doesn't transfer over to your database?


Phil Schwarzmann [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Whenever I use a mult-line textfield, the data inside doesn't transfer
 over.  But single-line textfields work just fine.

 how do i fix this?




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




[PHP] Help with header function

2002-06-10 Thread Shane Kelly

I'm creating an upload form for users to upload files to my server.  but I
don't want them to overwrite existing files if they try to upload using the
same file name...

THE FOLLOWING SCRIPT WORKS PERFECTLY

if (file_exists(uploads/documents/.$file_name)==TRUE) {
 die (File already exists);
 }
 else {
 copy($file,uploads/documents/.$file_name); }

BUT  I WOULD RATHER HAVE IT REDIRECT THEM TO ANOTHER PAGE USING

if (file_exists(uploads/documents/.$file_name)==TRUE) {
 header(Location:http://www.mysite.com/file_exists.php;);
 }
 else {
 copy($file,uploads/documents/.$file_name); }

THIS SCRIPT DOESN'T WORK...DOES ANYONE KNOW WHY???

Thanks

Shane
[EMAIL PROTECTED]



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




Re: [PHP] Help with header function

2002-06-10 Thread Shane Kelly

I don't get an error message...but the page doesn't automatically forward to
the redirected url.





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




Re: [PHP] Number formatting

2002-06-06 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

 $aprTemp = number_format($apr, 2); which in the case of 3.05 will return
 305.00 and 300.00 for 3%.  Anyone have a snippet to test and display
 properly so that 3% would be 3.00, etc.

you could try this...

$val = sprintf(%0.02f, $val);

Cheers

- -- 
Shane
www.shanewright.co.uk
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8/58q5DXg6dCMBrQRApb0AJsFZ7WxZK5PRguKZqNbRndVUnkl/QCgpafj
VWVFBaJ9ysYxJqNP3Bxm2EI=
=zrZI
-END PGP SIGNATURE-


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




Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi 

This may sound silly - but is there enough free disk space on whatever 
partition /tmp is mounted on?  

Alternatively, as a workaround, you could create a new directory and give the 
web server user permission to write to it and tell PHP to save sessions 
there.  (this is actually better from a security standpoint as well; less 
chance of session hijacking).

Cheers

- -- 
Shane
www.shanewright.co.uk
Public Key: http://www.shanewright.co.uk/files/public_key.asc


On Thursday 06 June 2002 6:31 pm, dan radom wrote:
 I can't seem to get session tracking to work to save my life.  The end
 result I'm after is to store the value of the single column returned from
 this query .. SELECT user_id from users WHERE user_name = '$user_name' AND
 user_password = '$user_password' .. for use throughout the site.  The
 current error I'm getting is Warning: Failed to write session data
 (files). Please verify that the current setting of session.save_path is
 correct (/tmp) in Unknown on line 0 which is very strange, as
 session.save_path is set to /tmp, and tmp is drwxrwxrwt2 root
 root.  The code is listed below.  Any suggestions are greatly appreciated.

 dan




 ?

 //  if ($user_name) {
 //class 'new uid' { var $row-user_id; };
 //start_session();
 //$abqSession = new abqnl;
 //$abqSession-user_id = $uid;
 //session_register(abqSession);
 // }

 if ($user_name) {
 session_id($_GET['user_id']);
 session_start();
 $foo=$row-user_id;
 $_SESSION[uid] = $foo;
 echo $foo;
 }


   include '/storage/apache/htdocs/test.radom.org/.siteconf.php';

   echo brbr;

   if (!$user_name) {

   echo center;

   echo table cellspacing=10;
   echo tr;

   echo form method=post action=\login.php\;

   echo td align=left;
   echo user name;
   echo /td;

   echo td align=left;
   echo input size=12 name=\user_name\;
   echo /td;

   echo /tr;
   echo tr;

   echo td align=left;
   echo password;
   echo /td;

   echo td align=left;
   echo input type=\password\ size=12 name=\user_password\;
   echo /td;

   echo /tr;
   echo tr;

   echo td;
   echo /td;

   echo td align=left;
   echo center;
   echo input type = \submit\ value=\submit\;
   echo /center;
   echo /td;

   echo /form;

   echo /tr;
   echo /table;

   echo /center;

   exit;

   } else

   $result = pg_exec ($database, SELECT user_id from users WHERE user_name
 = '$user_name' AND user_password = '$user_password');

   if (!$result) {
 echo query died\n;
 exit;
   }

   if (pg_num_rows($result) == 0) {
   echo centeryou have entered an invalid user name and password
 combination.  please try again.  new users may create an account from the
 sign up link above./center; exit;
 }


   for ($i = pg_num_rows($result) - 1; $i = 0; $i--) {
   if(!($row = pg_fetch_object($result)))
 continue;
   }

   echo your user_id is ;

   pg_close($database);

 ?
 /body
 /html

- -- 
Shane
www.shanewright.co.uk
Public Key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8/6S75DXg6dCMBrQRAjhVAKCcAb1x2/rWZFqtDBKQTCYb4OCmdACgmax8
eav61ozpEGIbHXzIYU7zt5A=
=EIC2
-END PGP SIGNATURE-


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




Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

On Thursday 06 June 2002 7:55 pm, dan radom wrote:
 the last bgcolor example was cut and pasted from oreilly's session tracking
 examples.  it should work.

IIRC, some things depend on your PHP version and ini file (register_globals, 
track_vars and maybe others).  its worth trying those definately.  The manual 
also says that $_SESSION is only available after 4.1.0 - if you're using an 
older version try $HTTP_SESSION_VARS.

  that file write error concerns me.  i think
 something larger is going on here.

Definately - if all else fails it could be worth upgrading PHP (if your ISP 
won't let you, maybe they've seen the problem before?).

Ah!  What user is your web server running as?  Try creating a new user, 
running the web server as that user (group as well come to think of it), and 
trying the permissions with that).  I'm not sure why this should make a 
difference but it rings bells for some reason (can't remember enough offhand 
about UNIX users/permissions).

Cheers

- -- 
Shane
www.shanewright.co.uk
Public Key: http://www.shanewright.co.uk/files/public_key.asc

 * Chris Knipe ([EMAIL PROTECTED]) wrote:
  Have you tried using $_SESSION['bgcolor'] = bleh
 
  It might work... who knows...
 
  - Original Message -
  From: dan radom [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, June 06, 2002 8:36 PM
  Subject: Re: [PHP] am i just a session tracking idiot?
 
   what's weird is that if i set session.save_handler = mm, i obviously
   don't
 
  get the file error, but it still won't work.
 
   here's another example of what i've tried...
  
   mars:~/apache/htdocs/test.radom.org$ cat test.php
   ?
   // create a new session
   session_start();
  
   // register a session-variable
   session_register(bgcolor);
  
   // Assign a value to the session-variable
   $bgcolor = #8080ff;
   ?
   html
   head
   titleSession Example #1/title
   /head
  
   body bgcolor=?=$bgcolor? text=#00 link=#00
 
  vlink=#00 alink=#00
 
   Welcome to a session-enabled page! The background color on the next
   page
 
  will be set to a stylish blue.p
 
   a href = test2.phpGo to another session-enabled page/a.
   /body
   /html
  
   and
  
   mars:~/apache/htdocs/test.radom.org$ cat test2.php
   ?
   // Resume session created in Listing 1-2
   session_start();
   ?
   html
   head
   titleSession Example #1/title
   /head
  
   body bgcolor=?=$bgcolor? text=#00 link=#808040
 
  vlink=#606060 alink=#808000
 
   ?
   // Retrieve SID from cookie.
   print Your SID is $PHPSESSID br;
  
   // Display the value of the $bgcolor variable.
   print The persistent background color is: $bgcolor.;
   ?
  
  
   argggh!
  
   * dan radom ([EMAIL PROTECTED]) wrote:
I've just tried that.  /foo is owned by nobody and is mode 777. 
there's
 
  135M available on that partition.
 
* Shane Wright ([EMAIL PROTECTED]) wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi

 This may sound silly - but is there enough free disk space on
 whatever partition /tmp is mounted on?

 Alternatively, as a workaround, you could create a new directory
 and
 
  give the
 
 web server user permission to write to it and tell PHP to save
 
  sessions
 
 there.  (this is actually better from a security standpoint as
 well;
 
  less
 
 chance of session hijacking).

 Cheers

 - --
 Shane
 www.shanewright.co.uk
 Public Key: http://www.shanewright.co.uk/files/public_key.asc

 On Thursday 06 June 2002 6:31 pm, dan radom wrote:
  I can't seem to get session tracking to work to save my life. 
  The
 
  end
 
  result I'm after is to store the value of the single column
  returned
 
  from
 
  this query .. SELECT user_id from users WHERE user_name =
 
  '$user_name' AND
 
  user_password = '$user_password' .. for use throughout the site.
 
  The
 
  current error I'm getting is Warning: Failed to write session
  data (files). Please verify that the current setting of
  session.save_path
 
  is
 
  correct (/tmp) in Unknown on line 0 which is very strange, as
  session.save_path is set to /tmp, and tmp is drwxrwxrwt2
  root root.  The code is listed below.  Any suggestions are
  greatly
 
  appreciated.
 
  dan
 
 
 
 
  ?
 
  //  if ($user_name) {
  // class 'new uid' { var $row-user_id; };
  // start_session();
  // $abqSession = new abqnl;
  // $abqSession-user_id = $uid;
  // session_register(abqSession);
  // }
 
  if ($user_name) {
  session_id($_GET['user_id']);
  session_start();
  $foo=$row-user_id;
  $_SESSION[uid] = $foo;
  echo $foo;
  }
 
 
include '/storage/apache/htdocs/test.radom.org/.siteconf.php';
 
echo brbr;
 
if (!$user_name) {
 
echo center;
 
echo

[PHP] PLEASE: Second request...

2002-05-29 Thread Shane

Second request... Please, any help out there for where I can download the best GD 
module for PHP 4.0.6 on my WIN 2000 IIS box.

Thanks folks!

--
Howdy crew...

I have a client's ISP that is running php 4.0.6 on WIN IIS but does NOT have a version 
of GD installed.

My question to you is, What is the best version of the GD module that works with 
4.0.6, and where can I get it?

Trying to download just the GD module on PHP.NET has proven to be difficult.

Thanks in advance, as always.
- Shane

-- 
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] Best GD Module for 4.0.6

2002-05-28 Thread Shane

Howdy crew...

I have a client's ISP that is running php 4.0.6 on WIN IIS but does NOT have a version 
of GD installed.

My question to you is, What is the best version of the GD module that works with 
4.0.6, and where can I get it?

Trying to download just the GD module on PHP.NET has proven to be difficult.

Thanks in advance, as always.
- Shane

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




[PHP] HELP!!! QUOTES!

2002-05-24 Thread Shane

Question Please.

What is the syntax for getting double quotes to appear in an echo statement.

EXAMPLE:

echo My dog has 'fleas';

puts out... My dog has 'fleas'

But I need it to put out... My dog has fleas (NOTE DOUBLE QUOTES)
(So I can call a JavaScript function)

What am I missing here?

As always... Thanks in advance my friends.
- Shane

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




[PHP] B R A I N F R E E Z E !

2002-05-22 Thread Shane

Too Many HOURS!!!
Too Little MMs!!
Forgot... Brain... Ouch!

Someone please remind me, what the hell the syntax for the short hand of the PHP IF 
THEN statement is where multiple variables need to be checked

if($foo == Panda and $bar == bear){
 doWhatever();
}

Thanks gang!
- Shane

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




RE: [PHP] B R A I N F R E E Z E !

2002-05-22 Thread Shane

Thanks gang

echo(mm.$moreChocolate)

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




[PHP] Thumbnails from Binary DB info.

2002-04-29 Thread Shane

Greetings folks. I'm looking for a solution to make thumbnails from my binary files 
inside my mySQL DB. 

Can anyone give me some direction for options besides Image Magick?

TIA
- NorthBayShane

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




[PHP] Add FTP user via PHP?

2002-04-23 Thread Shane McBride

Is there a way to add an ftp user and assign them to a directory when the
host server does not and will not load the ftp module?

Shane McBride
RDI Technologies
www.rditech.net
Office: 410-575-6326
Fax:410-575-6327


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




[PHP] MAC file upload

2002-04-06 Thread Shane McBride

Hello,

I am able to upload and download Macintosh files but they seem to lose their
MIME type or extensions. I'm not sure what it is. I'm not a Mac dude.

When you download the file It loses the file association. It's for a company
I do work for that uses a lot of .ai and .psd files.


Any ideas on this?


Shane McBride
RDI Technologies
www.rditech.net
Office: 410-575-6326
Fax:410-575-6327


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




Re: [PHP] Undefined variables

2002-03-30 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


 Not really. You either have to init your variables or turn off notices
 in error_reporting() (or otherwise suppress them; i.e. display_errors =
 off).

initialising them with safe defaults is the thing to do - the point of the 
error is to warn about uninitialised variables (which, if register_globals is 
on, could be used by an attacker to make your scripts to bad things...)

- --
Shane
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8pmm85DXg6dCMBrQRAl0PAJ9W6iBFtaYtXBKnvmtfKPPVJzHWyACfRg91
6IXouixJwNAsLJDhvYyhnSs=
=DBej
-END PGP SIGNATURE-


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




Re: [PHP] Undefined variables

2002-03-30 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


sorry, didnt get that that was your prefered method - didnt mean to step on 
your toes :)

S

On Sunday 31 March 2002 2:50 am, Lars Torben Wilson wrote:
 On Sat, 2002-03-30 at 17:43, Shane Wright wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
   Not really. You either have to init your variables or turn off notices
   in error_reporting() (or otherwise suppress them; i.e. display_errors =
   off).
 
  initialising them with safe defaults is the thing to do - the point of
  the error is to warn about uninitialised variables (which, if
  register_globals is on, could be used by an attacker to make your scripts
  to bad things...)
 
  - --
  Shane

 Yes, this is my standard suggestion as well, but since Ernesto seemed
 to be aware of the issues I decided not to press the point.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8pm4K5DXg6dCMBrQRAsTLAJ9377x/gjRKbHrfcSYW11BKUgotgACfQmTw
x2rcCdMlPbAaPg8zAey7L/8=
=WVbB
-END PGP SIGNATURE-


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




[PHP] sessions concurrency

2002-03-13 Thread Shane Wright

Hi

If I set up a session while generating a page, and I store some data in it, 
when does that data become available for other connections from the same user 
(same session)?

I.e. If I have a complex page with some session data that is used to 
dynamically generate some of the images in the page, it is conceivably 
possible that the browser could receive the HTML and IMG tags for the images 
before the page itself finishes building.

I'm thinking that the session data probably isnt written until the PHP script 
exits, and that there probably isnt any locking.  Is this the case?

I imagine that if this is true I could write my own session save/load 
handlers to install with session_set_save_handler() and handle 
locking/concurrency issues - if so would these work if written in C as a php 
extension?

Any info appreciated,

Thanks

--
Shane

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




  1   2   >