[PHP] incorrect Timezone using mail()

2001-08-23 Thread jeffrey jeffrey

Hi,
When i use this function mail(), mail was sent successfully but when 
recipient receive the mail the date timezone is incorrect. It 
displayed  -0800 instead of +0800. Im from +0800. The timezone does not 
display correctly. I have tried different servers but still the same. 
And all clients get the wrong date. Im Using php 4.06 and win2k and 
winnt4.

Can anybody help me.

Thanks


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




[PHP] pdflib, NEED HELP with function problem (newby)

2002-07-25 Thread Jeffrey

Hello,

Using php v 4.2.2 with pdflib support, on apache v. 1.3, and redhat
linux 7.2.

I for some reason can not get a pdf_setfont, pdf_set_text_pos,
pdf_[anything], to work inside a function. What is going on. All the pdf
extensions work find as long as I dont try to use them inside a function
that I create.

ie:

PDF_set_text_pos($p, 80, 670);
PDF_show($p, "Requirements:");

works just fine outside of a function but if I put the same thing inside a
function like so


function help()
 {
  PDF_set_text_pos($p, 80, 670);
  PDF_show($p, "Test:");
 }

I will not get Test text to display inside the PDF document, If I change
this, so that I add a position to it, like so:

function help($position_y)
 {
  PDF_set_text_pos($p, 80, $position_y);
  PDF_show($p, "Test:");
 }

I get this error:

Warning: pdf_set_text_pos(): supplied argument is not a valid pdf object
resource in /var/www/html/form/test.php on line 16

What am I doing wrong?

Jeff





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




[PHP] PDF_function HELP again!!! :(

2002-07-30 Thread Jeffrey

Here we go again; I posted the message "pdflib, NEED HELP with
function problem (newby)" and thank you to all that helped. Even
after that help, seems I cant understand scope to well.

Im trying to make a function that creates another page when I
have reached the bottom of a page. For some reason everytime I try to
include a PDF_function call inside a function I get an out of scope
error message. Like so:

"Fatal error: PDFlib error: function 'PDF_begin_page' must not be
called in 'page' scope"

The function I created is below

function next_page($throw)
{
global $p;

if ($throw = "open")
{
PDF_begin_page($p, 600, 800);
return;
}

if ($throw = "close")


PDF_end_page($p);
return;
}
}

All I do is put in to var $throw open or close and its not
working; $p is global, what am I doing wrong? Im really having a terrible
time
with scope and php, no calles from PDF seem to want to work inside a
function. Thanks for any help you guys can give me. Im pulling my hair out.
PHP is
a great language but this scope stuff is givin me fits.

Jeff




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




[PHP] Re: PDF_function HELP again!!! :(

2002-07-30 Thread Jeffrey


Diregard the missing "{" bracket its not the problem, I dont why its missing
from my post.

Jeff

Jeffrey <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Here we go again; I posted the message "pdflib, NEED HELP with
> function problem (newby)" and thank you to all that helped. Even
> after that help, seems I cant understand scope to well.
>
> Im trying to make a function that creates another page when I
> have reached the bottom of a page. For some reason everytime I try to
> include a PDF_function call inside a function I get an out of scope
> error message. Like so:
>
> "Fatal error: PDFlib error: function 'PDF_begin_page' must not be
> called in 'page' scope"
>
> The function I created is below
>
> function next_page($throw)
> {
> global $p;
>
> if ($throw = "open")
> {
> PDF_begin_page($p, 600, 800);
> return;
> }
>
> if ($throw = "close")
>
>
> PDF_end_page($p);
> return;
> }
> }
>
> All I do is put in to var $throw open or close and its not
> working; $p is global, what am I doing wrong? Im really having a terrible
> time
> with scope and php, no calles from PDF seem to want to work inside a
> function. Thanks for any help you guys can give me. Im pulling my hair
out.
> PHP is
> a great language but this scope stuff is givin me fits.
>
> Jeff
>
>
>



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




Re: [PHP] PDF_function HELP again!!! :(

2002-07-30 Thread Jeffrey

Wish it was that easy, here is the call to end the page right above as im
trying to trouble shoot this problem.

// End document
PDF_end_page($p);

// Test document open close function
next_page(open);
next_page(close);


I can remove those next_page function calls and just put in the
PDF_begin_page and end page calls and it works right away, but it wont work
inside the function :(.

Jeff



Rasmus Lerdorf <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Sounds like you didn't call pdf_end_page() before calling your next_page()
> function.
>
> -Rasmus
>
> On Tue, 30 Jul 2002, Jeffrey wrote:
>
> > Here we go again; I posted the message "pdflib, NEED HELP with
> > function problem (newby)" and thank you to all that helped. Even
> > after that help, seems I cant understand scope to well.
> >
> > Im trying to make a function that creates another page when I
> > have reached the bottom of a page. For some reason everytime I try to
> > include a PDF_function call inside a function I get an out of scope
> > error message. Like so:
> >
> > "Fatal error: PDFlib error: function 'PDF_begin_page' must not be
> > called in 'page' scope"
> >
> > The function I created is below
> >
> > function next_page($throw)
> > {
> > global $p;
> >
> > if ($throw = "open")
> > {
> > PDF_begin_page($p, 600, 800);
> > return;
> > }
> >
> > if ($throw = "close")
> >
> >
> > PDF_end_page($p);
> > return;
> > }
> > }
> >
> > All I do is put in to var $throw open or close and its not
> > working; $p is global, what am I doing wrong? Im really having a
terrible
> > time
> > with scope and php, no calles from PDF seem to want to work inside a
> > function. Thanks for any help you guys can give me. Im pulling my hair
out.
> > PHP is
> > a great language but this scope stuff is givin me fits.
> >
> > Jeff
> >
> >
> >
> >
> > --
> > 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] PDF_function HELP again!!! :(

2002-07-30 Thread Jeffrey

I feel like an idiot. That was it. :(  I hate when that happens, at least Im
new at php so I can fogive myself for not seeing it.


Thanks a whole heap; Ive been staring at this problem for days.

Jeff

Rasmus Lerdorf <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Oh, watch your = vs. == in your if statements.
>
> On Tue, 30 Jul 2002, Jeffrey wrote:
>
> > Wish it was that easy, here is the call to end the page right above as
im
> > trying to trouble shoot this problem.
> >
> > // End document
> > PDF_end_page($p);
> >
> > // Test document open close function
> > next_page(open);
> > next_page(close);
> >
> >
> > I can remove those next_page function calls and just put in the
> > PDF_begin_page and end page calls and it works right away, but it wont
work
> > inside the function :(.
> >
> > Jeff
> >
> >
> >
> > Rasmus Lerdorf <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Sounds like you didn't call pdf_end_page() before calling your
next_page()
> > > function.
> > >
> > > -Rasmus
> > >
> > > On Tue, 30 Jul 2002, Jeffrey wrote:
> > >
> > > > Here we go again; I posted the message "pdflib, NEED HELP with
> > > > function problem (newby)" and thank you to all that helped. Even
> > > > after that help, seems I cant understand scope to well.
> > > >
> > > > Im trying to make a function that creates another page when I
> > > > have reached the bottom of a page. For some reason everytime I try
to
> > > > include a PDF_function call inside a function I get an out of scope
> > > > error message. Like so:
> > > >
> > > > "Fatal error: PDFlib error: function 'PDF_begin_page' must not be
> > > > called in 'page' scope"
> > > >
> > > > The function I created is below
> > > >
> > > > function next_page($throw)
> > > > {
> > > > global $p;
> > > >
> > > > if ($throw = "open")
> > > > {
> > > > PDF_begin_page($p, 600, 800);
> > > > return;
> > > > }
> > > >
> > > > if ($throw = "close")
> > > >
> > > >
> > > > PDF_end_page($p);
> > > > return;
> > > > }
> > > > }
> > > >
> > > > All I do is put in to var $throw open or close and its not
> > > > working; $p is global, what am I doing wrong? Im really having a
> > terrible
> > > > time
> > > > with scope and php, no calles from PDF seem to want to work inside a
> > > > function. Thanks for any help you guys can give me. Im pulling my
hair
> > out.
> > > > PHP is
> > > > a great language but this scope stuff is givin me fits.
> > > >
> > > > Jeff
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 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] Sending Pictures to Cell Phones

2007-11-21 Thread Jeffrey

Maybe too late. Here are some simple starting points.

If you want to send pictures as MMS messages, you will need to use an 
SMS gateway. How different the protocols are for SMS and MMS, I don't 
know. But I've used www.clickatel.com's SMS gateway happily. So, you 
might want to start there. They are responsive - so you could probably 
get advice. They even have some PHP scripts for interacting with their 
gateway.


If you want to make pictures available as images on web enabled 
telephones, I suggest you download Opera web browser. It has a function 
that allows you to preview small screen pages, which can be useful for 
developing if you want to use this route.


Good luck!

Jeffrey

[EMAIL PROTECTED] wrote:

Hey list,

I'm doing some R&D for a project at my job and my boss wants the ability
to send pictures to cell phones. I was wondering if anyone had any
experience with this or could point me in the right direction to get
started.

Thanks,
Jeremy



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



[PHP] Page not displayed/Forbidden on PHP forms

2007-11-22 Thread Jeffrey
We are running identical web applications with two different hosts. Both 
are LAMP.


With one of hosts, we are having reports of users seeing "Page not 
displayed" or "403 Forbidden" after submitting forms. These forms are 
always sending data to the same page from which they started and the 
problem is not consistent. (ie. sometimes the forms work fine, sometimes 
they deliver the error). The problem only seems to have occurred with 
users on IE and mostly who are a significant distance from the server.


This does not seem to be occurring at the other host.

The problem host is not being responsive about solving the problem 
(which will cost them our business). Could this be a PHP time-out issue? 
Something in the PHP settings or is it likely a server issue or 
something else.


Your expertise - as always - is much appreciated!

Jeff

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



[PHP] Cron php & refresh

2008-04-20 Thread Jeffrey
I'm working on an application that includes e-mail notifications of 
certain events. Because the application will have hundreds or thousands 
of users, I've designed it so that e-mail notifications are saved to a 
MySQL table. Then a regular cron job runs a php page to select the data 
from the table, put it into a mail() command and mail.


My original vision was to have the script do about 50 mails, then pause 
for a 5 seconds, do a meta refresh and run through another 50 and so on 
- with experimentation in numbers as necessary. This process was set up 
because I recall reading somewhere - perhaps the manual - that it is not 
a good thing to run too many php mail()s in succession. Also, I worry 
about php time-outs.


If you know more about PHP and 'nix than I do, you already realise the 
fatal flaw here: meta refresh doesn't work on a cron job.


Question: is there an alternative? I appreciate I could use sleep() 
after every 50 mails - but there would still be the time-out problem.


I've searched the manual and via Google - but haven't found anything - 
possibly I am searching on the wrong terms.


Your help will be much appreciated.

Thanks,

Jeffrey

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



Re: [PHP] Cron php & refresh

2008-04-20 Thread Jeffrey

Per Jessen wrote:

Jeffrey wrote:


I'm working on an application that includes e-mail notifications of
certain events. Because the application will have hundreds or
thousands of users, I've designed it so that e-mail notifications are
saved to a MySQL table. Then a regular cron job runs a php page to
select the data from the table, put it into a mail() command and mail.


Why not just send the notification at the time of the event?  (I assume
you update the database at the time of the event).


/Per Jessen, Zürich


Because in my experience, several hundred e-mails takes time to send, 
hence either the user leaves the page before all the mails are sent or 
the page times out before all mails are sent. And if there are thousands 
of e-mails, it will only get worse.


Jeffrey


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



[PHP] Session breaks when form data submitted

2006-07-20 Thread Jeffrey
We have a site which requires users log in. Once they do so a session is 
created (session_start), some data is saved as session data, 
particularly data which identifies the user, their privileges, etc. If 
the session ends, breaks, etc. The user must log in again.


There are also forms on the site. When a user submits a form, data, both 
posted and session, is saved to a MySQL database.


If a session breaks when a user submits data via the form, the result is 
that the user must log in again, the data is lost and the user unhappy. 
This happens rarely - but when it does, it can upset the user who has 
put effort into completing the form.


Is there a simple yet secure way of preventing this problem - for 
example passing the session id  with the form and resurrecting the 
session if it has broken?


Thanks,

Jeff

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



[PHP] Can PHP Build XML Pages?

2003-07-14 Thread Jeffrey Fitzgerald
   Looking for direction PHP and XML. I have a need to build a simple XML 
doc from a PHP set of form vars. Any tips or examples are greatly appreciated.

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


[PHP] Parsing Current Server Domain

2003-08-28 Thread jeffrey pearson
Does anyone know how I would parse the domain that scripts are currently being 
executed in?

For example:

I use seperate domains for development and production. There are times I have to 
specify a hard coded url instead of a relative one. So for the development it would be;

dev.domain.com/somefile.php

where on the live site it would be

www.domain.com/somefile.php

I would like the script to be able to parse the domain part so it would be;

$currentdomain/somefile.php


AAny suggestions would be greatly appreciated.

Jeff Pearson

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



Re: RE: [PHP] PHP Editor - which to use?

2003-09-23 Thread jeffrey pearson
I like to use Edit Plus. www.editplus.com

It has the syntax highlighting for php, perl, java, and many others through modules 
that are downloadable from their web site, DOESNT change code like dreamweaver does 
and its cheap ($25). 

Jeff Pearson

- Original Message -
From: "Ruessel, Jan" <[EMAIL PROTECTED]>
Date: Monday, September 22, 2003 2:00 am
Subject: RE: [PHP] PHP Editor - which to use?

> well, i like to use dreamweaver mx or textpad with the syntax highlighting 
> file you additionally have to download. i dunno if there are special "php-
> must-have-editors".
> grtz
> jan
> 
> -Original Message-
> From: Binay [EMAIL PROTECTED]
> Sent: Montag, 22. September 2003 10:58
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP Editor - which to use?
> 
> 
> Hi everybody!
> 
> Please suggest me  a good PHP editor like ( Microsoft's Interdev for ASP) 
> to write my php programs/scripts and get a visual feel.
> 
> 
> Thanks 
> Binay
> 
> -- 
> 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] Create from PHP on the Fly???

2003-10-02 Thread Jeffrey Fitzgerald

Can this be done?  How much $$$?  Quality of PDF??   Thanks very much...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Operator question

2003-12-09 Thread Jeffrey Labonski

Uhhh, nope. That only works in your code if $b is initially 0. They're
shorthand for "do something and reassign".

$a = 100;

$a += 10;  // $a = $a + 10
$a -= 10;  // $a = $a - 10
$a /= 10;  // etc...
$a += 10;
$a <<= 2;
$a .= ' is a weird number';

$mode = 0755;
$mode &= 01;

--Jeff

-- 
Jeffrey Labonski|  http://www.eportation.com
Senior Software Developer   |  (215) 627-2651 voice
ePortation, LLC.|  (267) 237-7866 cell
[EMAIL PROTECTED]   |  (215) 893-5287 fax

On Tue, 9 Dec 2003, Richard Davey wrote:

> Hello Jeff,
>
> Tuesday, December 9, 2003, 4:11:10 PM, you wrote:
>
> JM> In PHP, what does the operator "-=" do?  I can't find a ref to it's
> JM> function in the online manual or any books I have.
>
> Set's a negative value:
>
> $a = 10;
> $b -= $a;
>
> or
>
> $b -= 10;
>
> In both cases $b will equal -10.
>
>

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



Re: [PHP] payment

2001-03-09 Thread Jeffrey Greer

On 9 Mar 2001 14:15:37 -0800, [EMAIL PROTECTED] (Rick St Jean)
wrote:

>How to people typically integrate payment processors with PHP?
>And what processors are used most often?  I know that a number
>of people are scrambling after cybercash died.  There is a site out
>there www.opay.com that says it supports payment processors
>on any platform, anyone ever use it?
>

Why hasn't any mentioned paypal.com.  Everything else is a joke.  What
company has a better deal than paypal?

With paypal's business account there are no credit checks and the rate
is 2.2% for cc payments.
--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- web developer/software engineer,
dedicated to the struggle against the fascist
Microsoft hegemony

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




Re: [PHP] payment

2001-03-10 Thread Jeffrey Greer

On 9 Mar 2001 22:43:08 -0800, [EMAIL PROTECTED] (Aaron Tuller)
wrote:

>At 12:27 AM -0600 3/10/01, Jeffrey Greer wrote:
>>With paypal's business account there are no credit checks and the rate
>>is 2.2% for cc payments.
>

You bring up valid points, but I still think paypal could be good for
a lot of e-commerce sites.

>except you can't really integrate it into your web site.  

Have you looked at web accept?  I think this is pretty integrated.

>who knows 
>how long paypal will be around.  

With its low rates and ease of use I think paypal will be around
awhile.

>it shoes up as paypal on people's 
>credit card statements, that's not very proffesional.  

I don't think this would be bad in all situations.

>you can't do 
>recurrent billing.

That is a problem.

>  you are forcing your customer to give their info 
>to a third party.
>

I wouldn't think this is so bad.  Many web sites I go to use a third
party to do their payments.

>there's no time delay between the authorization of a card and the 
>capture of the funds which means you need to ship the product right 
>away, which sometimes, is impossible.

Why does this mean you have to ship the product right away.  Don't you
have at least 30 days, by law, to ship a product after you have
charged for it.

>
>paypal might be good for ebay.  it's not good for e-commerce sites. 
>I don't think so anyway.


Maybe paypal is not good for some sites, but I wouldn't say it is not
good for all e-commerce sites.  My web developer partner has been
using paypal for a year and he has had not trouble.  His site is at:

http://singles.showmethenet.com/

I'll email paypal and ask them if they plan to move to the level of
professional service offered by other companies.

--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- web developer/software engineer,
dedicated to the struggle against the fascist
Microsoft hegemony

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




[PHP] form code for download - very powerful, object oriented

2001-03-12 Thread Jeffrey Greer

Hello,

I've created some form code.  It is not finished yet, but it is usable
and powerful.  I've looked at other form code, but none is object
oriented.  I've put this code up before it is finished so I can get
some suggestions for future development.

With this form class you can create your own inputs which inherit from
the base class input.  You could also add one more level of
inheritance for javascript functionality.  This form class also
supports style sheets.

Check it it.  I have a working example at:
http://www.showmethenet.com/~cleaner/code/code.php

The source is free.
--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- web developer/software engineer,
dedicated to the struggle against the fascist
Microsoft hegemony

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




[PHP] Got OO error after upgraded php3.0.8 to php4.05

2001-05-18 Thread Jeffrey Wang

Hi,
I got error on OO programming after upgraded php3.0.8 to php4.05. I am
using apache 1.3.14, phplib 7.2c and MYSQL 3.23.36. The program was working
fine under PHP 3.0.8.  Error  is showing all html code on browser as
following.
<{FONT FORM Method=post ACTIONLIGN=CENTERE="verdana, helvetica, arial"
size=1} COLOR="#00"> <{FONT FORM Method=post
ACTIONLIGN=CENTERE="verdana, helvetica, arial" size=1}>{Ann Street
Elementary}, {126 E Bloom St}, {Los Angeles}, {CA} {90012}, {UNITED STATES}
Anybody got same problem? I searched all mailing lists and didn't find any
answer.  I did down grade to different versions (4.01, 4.04) of php4 and
doesn't help. Thank you.
Jeff.


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




[PHP] Why does this not work??

2002-04-22 Thread Jeffrey Means

In using the setcookie function I can not set a cookie if I specify a time 
period.  ie. setcookie("Cookie_Name", "Cookie_Value", time()+30); will not 
set a cookie, but setcookie("Cookie_Name", "Cookie_Value"); does work.  What 
am I dooing wrong??



Jeffrey D. Means
CIO for PicoTech
Fort Collins, Colorado


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




[PHP] $8/mo php hosting on 24/7, OC3+ web server

2001-04-06 Thread Jeffrey Greer

Hello,

I am offering php hosting with features at a price no one else has, as
far as I know.  I'm not going to create a giant web hosting service.
I'm doing this to pay for my web portal.

- This web portal has been operated by the same person (my partner)
for over four years. I have been a co-administrator for about six
months.
- this is on a dedicated server with OC3+ connection, bandwidth is
guaranteed
- 24/7 uptime is guaranteed, last reboot was 2/12/01. This site will
not be down for more than one hour per year.
- The computer running this site is at a web server farm in a
protected building. Any hardware that fails is replaced immediately.
- no bandwidth sucking sites are allowed, e.g. porno, fileserver,
video, etc.
- php 4.02 is installed
- perl 5.0x and DBI are installed
- MySQL 3.23.32 and PostgreSQL 7.0.3 are set up
- You get a total of two databases
- You get five email addresses, telnet, ssh, and ftp access
- I will set up your domain name for an extra $15 or you can put your
site at www.singlesconnection.org/
- you get 40MB of hd space
- webserver is Apache 1.3.12 and Red Hat Linux with kernel 2.2.18
- hardware - Pentium II with 128MB ram, scsi hard drive


My name is Jeffrey Greer. You can mail me at
[EMAIL PROTECTED]
You can view more info at
http://www.singlesconnection.org/services/php_hosting.php

--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- web developer/software engineer,
dedicated to the struggle against the fascist
Microsoft hegemony

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




Re: [PHP] Cookie Expire Problem

2001-04-07 Thread Jeffrey Paul


actually, the offending line is:

$cookie_expire = "$time*3";

it may be set too high if you triple it, but i think what might be 
happening is that it's setting $cookie_expire to '986703865*3' which would 
be invalid.

if this is the case (i dont think you can multiply inside of quotes), then 
this is caused by bad programming style.  Better is to only quote when 
dealing with strings... if you know it's math, then leave the quotes at home.

solution:

$cookie_expire = time() + 86000*365*10;

(86000 = number of seconds in the day, times 365 days, times 10 
years).  Order of operations will multiply before adding. bada-bing, bada-boom.

-j


PS: hi everyone out there in php land, i'm new on the list, but you might 
know me from eyearcee.


At 12:15 AM 4/8/2001, Plutarck wrote:
>The problem is that it is too far in the future.
>
>Your cookie is set to expire in the year 2280. You think that's a little
>overkill?
>
>
>And it runs into the UNIX-style Y2K problem which is...um...13 years from
>now? Well anyway...
>
>Make your cookie's expire time a little more reasonable. Like 5 years from
>now, which is this many seconds:
>15768
>
>So set it to time()+15768
>
>If someone has your cookie on their machine in the year 2280 and gets pissed
>that their login failed when it shouldn't of, don't worry about it. You'll
>be dead, too feeble to care, or a god for creating an application that still
>works after 270 years ;P
>
>
>--
>Plutarck
>Should be working on something...
>...but forgot what it was.
>
>
>""Jeff Oien"" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > This code won't set a cookie. I took the time part from a past
> > post to set the time for wy ahead. I must be doing it wrong
> > though:
> >
> > $time = time();
> > $cookie_name = "auth";
> > $cookie_value = "ok";
> > $cookie_expire = "$time*3";
> > $cookie_domain = "";
> > setcookie($cookie_name, $cookie_value, $cookie_expire, "/" ,
>$cookie_domain, 0);
> >
> > Thanks.
> > Jeff Oien
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
[EMAIL PROTECTED]  -   0x514DB5CB
he who lives these words shall not taste death
becoming nothing yeah yeah
forever liquid cool


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




[PHP] $8/mo php hosting on 24/7, OC3+ web server

2001-04-10 Thread Jeffrey Greer

Hello,

I am offering php hosting with features at a price no one else has, as
far as I know.  I'm not going to create a giant web hosting service.
I'm doing this to pay for my web portal.

- This web portal has been operated by the same person (my partner)
for over four years. I have been a co-administrator for about six
months.
- this is on a dedicated server with OC3+ connection, bandwidth is
guaranteed
- 24/7 uptime is guaranteed, last reboot was 2/12/01. This site will
not be down for more than one hour per year.
- The computer running this site is at a web server farm in a
protected building. Any hardware that fails is replaced immediately.
- no bandwidth sucking sites are allowed, e.g. porno, fileserver,
video, etc.
- php 4.02 is installed
- perl 5.0x and DBI are installed
- MySQL 3.23.32 and PostgreSQL 7.0.3 are set up
- You get a total of two databases
- You get five email addresses, telnet, ssh, and ftp access
- I will set up your domain name for an extra $15 or you can put your
site at www.singlesconnection.org/
- you get 40MB of hd space
- webserver is Apache 1.3.12 and Red Hat Linux with kernel 2.2.18
- hardware - Pentium II with 128MB ram, scsi hard drive


My name is Jeffrey Greer. You can mail me at
[EMAIL PROTECTED]
You can view more info at
http://www.singlesconnection.org/services/php_hosting.php

--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- web developer/software engineer,
dedicated to the struggle against the fascist
Microsoft hegemony

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




[PHP] __ $8/mo php hosting on 24/7, OC3+ web server ___

2001-04-10 Thread Jeffrey Greer

Hello,

I am offering php hosting with features at a price no one else has, as
far as I know.  I'm not going to create a giant web hosting service.
I'm doing this to pay for my web portal.

- This web portal has been operated by the same person (my partner)
for over four years. I have been a co-administrator for about six
months.
- this is on a dedicated server with OC3+ connection, bandwidth is
guaranteed
- 24/7 uptime is guaranteed, last reboot was 2/12/01. This site will
not be down for more than one hour per year.
- The computer running this site is at a web server farm in a
protected building. Any hardware that fails is replaced immediately.
- no bandwidth sucking sites are allowed, e.g. porno, fileserver,
video, etc.
- php 4.02 is installed
- perl 5.0x and DBI are installed
- MySQL 3.23.32 and PostgreSQL 7.0.3 are set up
- You get a total of two databases
- You get five email addresses, telnet, ssh, and ftp access
- I will set up your domain name for an extra $15 or you can put your
site at www.singlesconnection.org/
- you get 40MB of hd space
- webserver is Apache 1.3.12 and Red Hat Linux with kernel 2.2.18
- hardware - Pentium II with 128MB ram, scsi hard drive


My name is Jeffrey Greer. You can mail me at
[EMAIL PROTECTED]
You can view more info at
http://www.singlesconnection.org/services/php_hosting.php

--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- I do web hosting and development.  Details
  at http://www.singlesconnection.org/services/

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




Re: [PHP] __ $8/mo php hosting on 24/7, OC3+ web server ___

2001-04-10 Thread Jeffrey Greer

On 10 Apr 2001 12:08:01 -0700, [EMAIL PROTECTED] (Kurth Bemis)
wrote:

>At 06:15 PM 4/10/2001, Jason Lotito wrote:
>
>no no - its an OC3+ web server.must be an overseas brand..or 
>something..i've never heard of it.maybe its an SGI or something 
>they have wacky names for their stuff  :-)
>

It is at least OC3.  I forgot what comes next after OC3.

>no bandwidth sucking sites?  on an OC3...we're talking gigabits per sec 
>here.
>

You would max out the 100Mb/s network card first.

>no pron?  damn!  that puts me out!
>

I am a co-administrator.  I don't have a problem with porn sites, but
my partner would object.  But if you're really interested and you pay
us lots of money we can take care of you.

>what about security?  are they on top of the latest versions and 
>patches.i mean after all...it is REDHACK..
>

I'm no security expert, but I can apply the most important patches.
Yesterday I added mod_ssl to apache.

>spammers are funny people :-)
>
>~kurth
>

I'm not your average spammer.  I am a computer scientist dedicated to
the struggle against the fascist MS hegemony and all other fascist
corporations who try to control computer technology.  Support my
business and you'll be doing the world a favor. ;^)
--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- I do web hosting and development.  Details
  at http://www.singlesconnection.org/services/

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




Re: [PHP] __ $8/mo php hosting on 24/7, OC3+ web server ___

2001-04-10 Thread Jeffrey Greer

I'm not trying to provide the level of service of a large isp or even
get 100 customers.  I would just like to pay for my half of the web
portal.  I thought $8/mo for my service would be a good value for php
programmers who do not need a high level of security.

Would you say $8/mo is not a good value for the level of service I
will provide?

Web hosting is not my main business.  I'm a software developer.


Earlier I wrote:
> I'm no security expert, but I can apply the most important patches.
> Yesterday I added mod_ssl to apache.

I didn't mean adding ssl is a patch.  I know how to apply patches to
source code and make other updates.


On 10 Apr 2001 15:12:59 -0700, [EMAIL PROTECTED] ("Phillip Bow") wrote:

>Hi,
>I don't mean to bash, but these sort of answers don't give me a lot of
>faith in the service you are starting.  At the very least I expect my
>service provider to provide competent answers to questions,  and to know the
>basics of security.
>

--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- I do web hosting and development.  Details
  at http://www.singlesconnection.org/services/

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




Re: [PHP] __ $8/mo php hosting on 24/7, OC3+ web server ___

2001-04-11 Thread Jeffrey Greer

On 10 Apr 2001 19:08:03 -0700, [EMAIL PROTECTED] (Seung-woo Nam)
wrote:

>Jeffrey Greer wrote:
>> 
>> I'm not trying to provide the level of service of a large isp or even
>> get 100 customers.  I would just like to pay for my half of the web
>> portal.  I thought $8/mo for my service would be a good value for php
>> programmers who do not need a high level of security.
>> 
>> Would you say $8/mo is not a good value for the level of service I
>> will provide?
>> 
>> Web hosting is not my main business.  I'm a software developer.
>> 
>Well, then what's that all about 'hosting your business' thing on your
>website? And I wonder how will you possibly garantee the uptime you talk
>about on the site? $8 is a cheap price only if you can actually provide
>certain level of service. 
>
>Seung-woo Nam

This site has been up for about 4 years.  Downtime has been less than
a couple hours.  Crackers have infiltrated the system once, but didn't
get very far.  Why would you worry about uptime so much?  Is 1/2 per
year too much down time?

I will be applying security updates.  

--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- I do web hosting and development.  Details
  at http://www.singlesconnection.org/services/

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




RE: [PHP] Can't redeclare already declared function

2001-04-11 Thread Jeffrey Paul



better yet, try include_once() instead of all instances of include().  It 
will only include a file once, rather than every time you call include() on 
that path.

Nifty feature.

-j

At 11:17 AM 4/11/2001, Johnson, Kirk wrote:
>The function in question is defined in an included file, right? This
>function definition file is most likely being included twice. The best bet
>is that it is being included from another included file (at least, that's
>how I usually manage to produce this error :) ). Check all your included
>files for a line that re-includes the function definition file a second
>time.
>
>Kirk
>
> > -Original Message-
> > From: kenny.hibs [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 11, 2001 3:10 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Can't redeclare already declared function
> >
> >
> > Anyone help with this
> >
> > Fatal error: Can't redeclare already declared function in
> > header.php3 on
> > line 233
> > The troubl is that there is no line 233 so it must be looking
> > at another
> > page?
> >
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
[EMAIL PROTECTED]  -   0x514DB5CB
he who lives these words shall not taste death
becoming nothing yeah yeah
forever liquid cool


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




Re: [PHP] Creating Arrays

2001-04-12 Thread Jeffrey Greer

[posted and emailed]

If you're looking for a simple way to work with databases I would use
phplib.  Phplib is a db abstraction layer which supports over a dozen
databases including mysql.  You can get the libraries at
http://phplib.netuse.de/download/phplib-7.2c.tar.gz   You will need to
use "db_mysql.inc"

I think using mysql specific functions is bad programming.  Database
specific calls should be abstracted out whenever possible.

To do something like you would want to do you would use code like
this:

// create the db object

$db = new DB_Sql;

// initialize db parameters

$this->Host = ;
$this->Database = ;
$this->User = ;
$this->Password = ;

// E.g. make a simple query

$db->query("select username, uid, security_level from access where
username='$f_username' and password='$f_password';");

$db->next_record();
$db_username = $db->f("username");
$si_userid = (int)($db->f("uid"));
$si_security_level = (int)($db->f("security_level"));

// putting the values in an array is trivial, but you should do it
like this
//  or you will confuse your numeric ids with the ids that php
puts in an array automatically

$my_array["username"] = $db_username;
$my_array["userid"] = $si_userid;


On 11 Apr 2001 09:09:09 -0700, [EMAIL PROTECTED] ("Ashley M.
Kirchner") wrote:

>
>I need to convert an MySQL result into an Array...somehow.  The
>query returns the following:
>
>++---+
>| ID |  Project  |
>++---+
>|  1 | Home  |
>|  2 | Work  |
>|  3 |   Family  |
>|  4 |Misc.  |
>|  . |  ...  |
>|  . |  ...  |
>++---+
>
>...which I want to convert into:
>
>Array(1 => "Home", 2 => "Work", 3 => "Family", 4 => Misc.", etc);
>
>What's the best way to do this.
>
>AMK4
>
>--
>W |
>  |  I haven't lost my mind; it's backed up on tape somewhere.
>  |
>  ~
>  Ashley M. Kirchner    .   303.442.6410 x130
>  SysAdmin / Websmith   . 800.441.3873 x130
>  Photo Craft Laboratories, Inc. .eFax 248.671.0909
>  http://www.pcraft.com  . 3550 Arapahoe Ave #6
>  .. .  .  . .   Boulder, CO 80303, USA

--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- I do web hosting and development.  Details
  at http://www.singlesconnection.org/services/

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




Re: [PHP] Creating Arrays

2001-04-12 Thread Jeffrey Greer

[posted and emailed]

On 12 Apr 2001 12:48:52 -0700, [EMAIL PROTECTED] (Jeffrey
Greer) wrote:

>
>// putting the values in an array is trivial, but you should do it
>like this
>// or you will confuse your numeric ids with the ids that php
>puts in an array automatically

Whoops.  I was wrong about array.  Keys are only filled in
automatically if you do this:
$my_array[] = 'some value';
now $my_array[0] = 'some value';

>--
>Jeff Greer
>- B.S. computer science - Univ. MO - Rolla
>- I do web hosting and development.  Details
>  at http://www.singlesconnection.org/services/

--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- I do web hosting and development.  Details
  at http://www.singlesconnection.org/services/

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




Re: [PHP] return parse error

2001-04-13 Thread Jeffrey Paul

At 03:56 AM 4/13/2001, Peter Harkins wrote:
> This generates a parse error:
> mysql_connect("localhost", "root", "rootpw") or 
> return("bar");
>
> But all the following work fine:
> mysql_connect("localhost", "root", "rootpw") or die("bar");
>
> mysql_connect("localhost", "root", "rootpw") or 
> print("bar");
>
> if (!mysql_connect("localhost", "root", "rootpw")) {
> return("bar");
> }
>
> Why? mysql_connect returns false on failure either way... I 
> notice die


return isn't a function but a language construct.   This is why the third 
working line with the curlybraces works, and without them it doesn't.

include() is a language construct too.  the particulars of using language 
constructs (like return() and include()) with control structure syntax are 
explained on the page for include().

http://us2.php.net/manual/en/function.include.php

-j (aka sneak)



--
[EMAIL PROTECTED]  -   0x514DB5CB
he who lives these words shall not taste death
becoming nothing yeah yeah
forever liquid cool


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




[PHP] PHP & ImageMagick

2001-06-29 Thread Jeffrey Barendse

In PHP I try to run a shell command with the following source code:

$fotonaam = 'convert -font arial -pointsize 20 -gravity center -fill
white -draw "text 5,5 VERKOCHT" image.jpg image2.jpg';
exec($fotonaam);

PHP runs the program but the -draw "text 5,5 VERKOCHT" is not executed
(there is no VERKOCHT in the image2.jpg). I tried everything but I can't
solve the problem. Could somebody explain to me how it's possible that the
program (convert) runs but there (seams to be) a problem with -draw "text
5,5 VERKOCHT". If I run the same command troughs telnet/ssh as root or
nobody it works fine

Is it something with the " and the combinative with the exec function (I
also tried \")?

Or is it because I run PHP in safe mode and the convert program tries to run
a external program what is not in the . path (you now, the basic safe mode
restriction)?

Please help me.. I'm getting despaired on this in. ;-)

Regards,

Jeffrey Barendse




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




Re: [PHP] ADV. Natural penis enlargement -without surgery-!

2001-08-01 Thread Jeffrey Paul

At 09:00 PM 7/31/2001, Guaranteed ! wrote:
>We are a serious company, offering a program that will enhance your sex
>life, and  enlarge your penis in a totally natural way.

I think they got the ASP mailinglist mixed up with the PHP one..

-j


--
[EMAIL PROTECTED]   -  0xF50BB9D7
A21A FD82 8C30 EC77   545D A0B3 F501 F50B B9D7
ICQ: 14295546-AIM: kw34hd1


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




Re: [PHP] Newbie: Site search, more than one directory

2001-08-01 Thread Jeffrey Paul

At 04:11 PM 8/30/2001, Steve Wright wrote:
>Hey,
>
>I have just developed a simple site search.. .and am after learning how to
>get it to search all directories... at present, it only searches the one it
>is in!!




> $cmdstr = "grep -i $searchstr *";


"man grep" on my linux box shows:

-r, --recursive
   Read all files under each directory, recursively; this is 
equivalent to the -d recurse
   option.

change it to:

$cmdstr = "grep -r -i $searchstr *";

In all honesty though, you might want to use an ereg_replace() on 
$searchstr before doing that, so that special shell characters can't get 
through.

Interesting take on searching...

-j



--
[EMAIL PROTECTED]   -  0xF50BB9D7
A21A FD82 8C30 EC77   545D A0B3 F501 F50B B9D7
ICQ: 14295546-AIM: kw34hd1


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




Re: [PHP] WEB LOG

2001-09-24 Thread Jeffrey Paul

At 07:08 AM 9/24/2001, Chris Herring wrote:
>OOPS, again, elseif isn't what needs to be done.
>
>Ok, here we go.
>
>if $pwd == $real_pwd {
>header ("Location: http://therealsite";);
>} else {
>header ("Location: http://badsite";);
>}
>

For the record, that won't stop someone from going to the destination page 
if the password doesn't match, which is what the person asked about.  All 
this will do is send them a redirect to an error page if the password 
doesn't match, it doesn't prevent anyone at all from hitting, in your 
example, http://therealsite.

-j



Jeffrey Paul  [EMAIL PROTECTED]  (877) 748 3467
ICQ: 14295546 AIM: kw34hd1 NXTL/DC: 130*21*16749
PGP: 0xF50BB9D7 A21AFD828C30EC77545DA0B3F501F50BB9D7


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




Re: [PHP] WEB LOG

2001-09-24 Thread Jeffrey Paul

At 10:09 AM 9/24/2001, Andreas Gietl wrote:
>Well. If you check the HTTP_REFERER on the target-site it would work and give
>you at least some "security". However it is still not really secure.

Wrong.  Many browsers don't send the Referer: header, not to mention it's 
downright trivial to spoof it.  This doesn't afford any more security at all.

-j


--------
Jeffrey Paul  [EMAIL PROTECTED]  (877) 748 3467
ICQ: 14295546 AIM: kw34hd1 NXTL/DC: 130*21*16749
PGP: 0xF50BB9D7 A21AFD828C30EC77545DA0B3F501F50BB9D7


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




Re: [PHP] Running a script with Crontab

2001-09-30 Thread Jeffrey Paul

At 01:25 PM 9/30/2001, [EMAIL PROTECTED] wrote:
>This is what I do, maybe is gonna help you
>
>bash file structure:
>
>  #!/bin/bash
>  ##
>  ##  mysql maintenance
>  ##
>  /usr/bin/mysql -u username --password=yourpassword <  use yourdatabase;
>  YOUR SQL query HERE;
>  exit
>  EOF
>
>then
>  chmod +x yourbashfile
>
>so "cronjob" this file with the desired frecuency


BAD BAD BAD idea.

if this is a public server (linux that's not running the openwall patch, 
for example) then anyone can see your password with a `ps auxwww` while 
it's running.  Scripts I run from cron are usually recalculation scripts in 
the middle of the night that take 10-15 mins to run, and as such would give 
anyone more than enough time to grab it while the script is running, not 
that it's not possible to grab it even with a shorter execution time as well.

-j



Jeffrey Paul  [EMAIL PROTECTED]  (877) 748 3467
ICQ: 14295546 AIM: kw34hd1 NXTL/DC: 130*21*16749
PGP: 0xF50BB9D7 A21AFD828C30EC77545DA0B3F501F50BB9D7


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




[PHP] PHP version usage statistics?

2004-04-14 Thread Jeffrey Tavares
Is there some way to know a general php usage statistics specific to how 
many run 4.1, 4.2, and 4.3? I'm trying to get an average percentage to 
figure out whether it would be a great loss to not support prior versions.

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


Re: [PHP] PHP version usage statistics?

2004-04-14 Thread Jeffrey Tavares
netcraft shows how many servers have php, but nothing specific about 
versions. Maybe I'm wrong, but I checked all over netcraft's site.

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


[PHP] Bug in == comparison?

2006-07-21 Thread Jeffrey Sambells


OK I have a very strange bug:

In the middle of my script I have these two lines:

var_dump($test,$test2);
echo "'$test'=='$test2' is ".($test==$test2);

which is giving:

int(0) string(6) "Points"
'0'=='Points' is 1

I understand that PHP is loose typed and automatically does type  
conversion but in the many years I've been using PHP (mostly v4) the  
comparison had always converted to 'string' and in the case above  
returned FALSE, not TRUE. It seems here they are comparing as  
integers thus 'Points' evaluates to 0 and the comparison is TRUE.


I tried comparing in the  reverse sequence ($test2==$test) and the  
same occurred. It does work as expected if I have === but the rest of  
the scirpt isn't type sensitive so I want NULL, 0, and empty string  
to still maintain equality.


Any ideas why this is suddenly happening? I'm using PHP 5.1, and I  
realize I could use other functions such as strval() in the  
comparison however I've used similar logic in the past without problems.


Any help would be great.

Thanks

Jeff



~~
Jeffrey Sambells
Director of Research and Development
Zend Certified Engineer (ZCE)

We-Create Inc.
[EMAIL PROTECTED] email
519.745.7374 x103 office
519.897.2552 mobile

~~
Get Mozilla Firefox at
http://spreadfirefox.com

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



[PHP] Re: Bug in == comparison?

2006-07-21 Thread Jeffrey Sambells

hrm..

It just seemed strange as the script I was working on is 3 years old  
and had worked flawlessly until today.


Thanks.

- Jeff

~~
Jeffrey Sambells
Director of Research and Development
Zend Certified Engineer (ZCE)

We-Create Inc.
[EMAIL PROTECTED] email
519.745.7374 x103 office
519.897.2552 mobile

~~
Get Mozilla Firefox at
http://spreadfirefox.com

On 21-Jul-06, at 12:45 PM, Adam Zey wrote:


Jeffrey Sambells wrote:

OK I have a very strange bug:
In the middle of my script I have these two lines:
var_dump($test,$test2);
echo "'$test'=='$test2' is ".($test==$test2);
which is giving:
int(0) string(6) "Points"
'0'=='Points' is 1
I understand that PHP is loose typed and automatically does type  
conversion but in the many years I've been using PHP (mostly v4)  
the comparison had always converted to 'string' and in the case  
above returned FALSE, not TRUE. It seems here they are comparing  
as integers thus 'Points' evaluates to 0 and the comparison is TRUE.
I tried comparing in the  reverse sequence ($test2==$test) and the  
same occurred. It does work as expected if I have === but the rest  
of the scirpt isn't type sensitive so I want NULL, 0, and empty  
string to still maintain equality.
Any ideas why this is suddenly happening? I'm using PHP 5.1, and I  
realize I could use other functions such as strval() in the  
comparison however I've used similar logic in the past without  
problems.

Any help would be great.
Thanks
Jeff


No, the opposite is true; strings are always converted to integers  
in such comparisons, as stated in TFM:


http://www.php.net/manual/en/language.operators.comparison.php

I'll quote it here:

"If you compare an integer with a string, the string is converted  
to a number. If you compare two numerical strings, they are  
compared as integers. These rules also apply to the switch statement."


In your case, it's a bug in your code; you should be using === to  
also verify type, or casting $var1 to a string in your comparison.


Regards, Adam Zey.


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



Re: [PHP] client<->server upload communication?

2006-08-06 Thread Jeffrey Sambells

Your page currently has a JS error but...

The short answer is not in PHP. The PHP script doesn't 'process' the  
upload of the file. When the file is received by the server, the  
script (line 1) starts executing AFTER the file is already fully  
uploaded, and the files temporary location is references in the  
$_FILES array.


You may be able to get access the the state of the upload using a  
PECL extension, I remember reading something somewhere...


My assumption here is you're trying to write a progress bar or  
something similar?


If all you're after is a 'state' then you could submit your form to  
an embedded  and have the resulting page run an "I'm done"  
javascript, but that would only give you the start (when the user  
clicks submit) and the end (when the done function runs), it won't  
give you a true state during the course of the upload.


- Jeff

P.S. You could use perl as it has access to the file WHILE it's  
uploading, not just after, but that's for a different list :c)



On 6-Aug-06, at 10:56 AM, tedd wrote:


Hi gang:

I posted this question on a js list, but didn't received an answer.  
Maybe someone here might be able to provide some insight or direction.


In my ajax "experiment" monitoring states, namely:

http://xn--ovg.com/ajax_readystate

I can see the readyState replies/conditions.

Is there something similar when uploading a file or image?

There has to be some sort of communication between the sender and  
the receiver, right?


If so, is there a way to tap into that communication?

Thanks in advance for any replies.

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.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] interview

2006-04-13 Thread Jeffrey Pearson

How about the Presidential election?!!


On Apr 13, 2006, at 9:23 AM, Jay Blanchard wrote:


[snip]
Great, now the interviewee will be able to cheat.  Way to go Jay.
[/snip]

*blush* I know. I wonder where we could apply, that way we can skew  
the

results so that the cheating doesn't matter.

--
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] For Loop

2006-06-20 Thread Jeffrey Sambells

for($i=1; $i<100; $i++) {
${'p'.$i.'name'} = 'whatever';
}

- jeff

On 20-Jun-06, at 6:14 PM, Albert Padley wrote:


I have a regular for loop - for($i=1; $i<100; $i++)

Within the loop I need to create variables named:

$p1name;
$p2name;
$p3name;
etc.

The integer portion of each variable name needs to be the value of $i.

I can't seem to get my syntax correct?

Can someone point me in the right direction?

Thanks.

Albert Padley

--
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] Question on PDF upload

2004-03-11 Thread Jeffrey Lee
Hi all,

I am new to this newsgroup, hello all!

I've written a script for my collueages to upload PDF file to the web server
(apache 2.0.40).  I do it via a http form submit.

Here's the form tag of it



All files (PDF, xls) are able to be uploaded properly.  And these can be
viewed in browser.  For one PDF file, it cannot be uploaded.  When I've
clicked submit, it should submit to upload.php, but for this particular pdf,
the browser displays "The Page Cannot Be Found".  I am sure that upload.php
is there as when I upload another file, it's working properly, even for
other pdf.

I would like to ask is it possible that something in that pdf's header
corrupted?  But, I can view that file in my acroread and if I use FTP to
upload that file, then I can view the file in browser also.  Oh, please
help.

Cheers,

Jeffrey

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



Re: [PHP] Question on PDF upload

2004-03-11 Thread Jeffrey Lee
Hi,

I am sorry about that I didn't mention about the file size of that pdf.
It's less than 1MB and I have checked my php.ini that it allows
post_max_size = 8M.  So, in my little knowledge, I think it's alright.

Thanks for your help.

Jeffrey

- Original Message - 
From: "Raditha Dissanayake" <[EMAIL PROTECTED]>
To: "Jeffrey Lee" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 11, 2004 6:06 PM
Subject: Re: [PHP] Question on PDF upload


> ifIf you can view the file in your reader (before uploading) , the most
> likely that you have exceeded the upload limit or something related to
> that. hope you find the artilce at
> http://www.radinks.com/upload/config.php usefull in configuring your php
> to handle large uploads.
>
> All the baest
>
> Jeffrey Lee wrote:
>
> >Hi all,
> >
> >I am new to this newsgroup, hello all!
> >
> >I've written a script for my collueages to upload PDF file to the web
server
> >(apache 2.0.40).  I do it via a http form submit.
> >
> >Here's the form tag of it
> > >method="POST" onSubmit="return chkFields();">
> >
> >
> >All files (PDF, xls) are able to be uploaded properly.  And these can be
> >viewed in browser.  For one PDF file, it cannot be uploaded.  When I've
> >clicked submit, it should submit to upload.php, but for this particular
pdf,
> >the browser displays "The Page Cannot Be Found".  I am sure that
upload.php
> >is there as when I upload another file, it's working properly, even for
> >other pdf.
> >
> >I would like to ask is it possible that something in that pdf's header
> >corrupted?  But, I can view that file in my acroread and if I use FTP to
> >upload that file, then I can view the file in browser also.  Oh, please
> >help.
> >
> >Cheers,
> >
> >Jeffrey
> >
> >
> >
>
>
> -- 
> Raditha Dissanayake.
> ---
> http://www.radinks.com/upload/
> Drag and Drop Upload thousands of files and folders in a single
> transfer.  (HTTP or FTP)
>
> -- 
> 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] windows 2003 server configuration

2004-03-12 Thread Schmidt, Jeffrey
I am running Windows 2003 server and am having trouble configuring. I
unzipped php 4.+ to c:\php. I renamed php.ini and put it in C;\windows
and configured the extension_dir = c:\php\extensions, doc_root =
c:\inetpub\wwwroot, and cgi.force_redirect = 0. I also moved php4ts.dll
to c:\windows\sytem32 and then created a ned webservice extension named
.php and set the path to c:\php\sapi\php4isapi.dll. Then on to
properties of and execute permissions added scripts and executables.
Configure tab added .php and set the path to c:\php\sapi\php4isapi.dll
and check mark out of verify file exist. Then I went to add content page
and added index.php and moved it to the top.
 
I am getting in my web browser with a test file "SERVICE UNAVAILABLE".
At other configurations I would get an "NO INPUT FILE SPECIFIED". Now
when I am trying to run my script a windows dialogue box is coming up
asking me for username and password and I am logged in as administrator.
 
I f you have any ideas where you can help PLEASE understand my pain.
 
Thank you,
Jeff Schmidt. 


[PHP] Re: [Q] PHP code embedded in html files - What happens?

2004-03-14 Thread Jeffrey Lee
Hi Michael,

In my understanding, web server will involve php interpreter when the file
extension is specify.  Say, if a web server is configured to involve php
interpreter when the extension is php, then when the request file is php,
the php file's content will be interpreted.  So, I think your web server is
configured like this.  I believe it's normal behaviour in your case.
Please correct me if I've made anything wrong, thanks.

Cheers,
Jeffrey

"Michael T. Peterson" <[EMAIL PROTECTED]> ¦b¶l¥ó
news:[EMAIL PROTECTED] ¤¤¼¶¼g...
> When the following file, tmp.htm, is executed no output is produced.
>
> 
> 
> Test
> 
> 
> 
>   echo 'hello world';
> ?>
> 
> 
>
> However, when the name of the file is changed to tmp.php the expected
> output, 'hello world', is obtained.  Is this the correct behavior?  More
> specifically, is the php script not executed?
>
> Cheers,
>
> Michael

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



RE: [PHP] E-mail account disabling warning.

2004-03-18 Thread Jeffrey Shaw
There seems to be a lot of these going around.

Remember:

Don't open attachments unless you are sure of what you are getting!

Keep your Virus Scan program up to date.  Any database over 14 days old
should be updated.

Many times, the Headers and addresses of the messages are faked.  This is
easy to do.  So if there is any doubt, send an e-mail to an address listed
at the website the email originates from and ask for more information.

These virus writers are relying on people to unwittingly open their
attachments so they may go through with their evil plans.

Is there any Php.net official on this list that can shed more light on this
please

JL Shaw
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.620 / Virus Database: 399 - Release Date: 3/11/2004

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



Re: [PHP] Question on PDF upload

2004-03-19 Thread Jeffrey Lee
Hi all,

I believe many of you know this already.  But, for someone who's this
problem, I'd like to let u know something about file upload.
When u'd like to upload something by POST, if it fails, I will probably to
go edit php.ini's max_file_size value, but if it still fails, then?

Thanks for Raditha Dissanayake who gave out this link:
http://www.radinks.com/upload/config.php

And, if your apache's (Oh, I am using Apache only) and u've got this error
message in your error_log:
Requested content-length of 615950 is larger than configured limit of 524288
Then u may read this:
http://www.faqts.com/knowledge_base/view.phtml/aid/8176
Well, just editing or removing the line "LimitRequestBody", I made it work.
It may only for my case, but hope this helps a few people.

Finally, may I ask a question?  In my case, all of the PDFs that generated
from MS Word + Acrobat can be upload with the content-length=512KB, but the
PDFs generated from PageMaker, its content-length is greater than 512KB, why
the content-lengths are different?

Sorry for my poor english.

Thanks for your help.

Jeffrey




> Hi,
>
> I am sorry about that I didn't mention about the file size of that pdf.
> It's less than 1MB and I have checked my php.ini that it allows
> post_max_size = 8M.  So, in my little knowledge, I think it's alright.
>
> Thanks for your help.
>
> Jeffrey
>
> - Original Message - 
> From: "Raditha Dissanayake" <[EMAIL PROTECTED]>
> To: "Jeffrey Lee" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, March 11, 2004 6:06 PM
> Subject: Re: [PHP] Question on PDF upload
>
>
> > ifIf you can view the file in your reader (before uploading) , the most
> > likely that you have exceeded the upload limit or something related to
> > that. hope you find the artilce at
> > http://www.radinks.com/upload/config.php usefull in configuring your php
> > to handle large uploads.
> >
> > All the baest
> >
> > Jeffrey Lee wrote:
> >
> > >Hi all,
> > >
> > >I am new to this newsgroup, hello all!
> > >
> > >I've written a script for my collueages to upload PDF file to the web
> server
> > >(apache 2.0.40).  I do it via a http form submit.
> > >
> > >Here's the form tag of it
> > > > >method="POST" onSubmit="return chkFields();">
> > >
> > >
> > >All files (PDF, xls) are able to be uploaded properly.  And these can
be
> > >viewed in browser.  For one PDF file, it cannot be uploaded.  When I've
> > >clicked submit, it should submit to upload.php, but for this particular
> pdf,
> > >the browser displays "The Page Cannot Be Found".  I am sure that
> upload.php
> > >is there as when I upload another file, it's working properly, even for
> > >other pdf.
> > >
> > >I would like to ask is it possible that something in that pdf's header
> > >corrupted?  But, I can view that file in my acroread and if I use FTP
to
> > >upload that file, then I can view the file in browser also.  Oh, please
> > >help.
> > >
> > >Cheers,
> > >
> > >Jeffrey
> > >
> > >
> > >
> >
> >
> > -- 
> > Raditha Dissanayake.
> > ---
> > http://www.radinks.com/upload/
> > Drag and Drop Upload thousands of files and folders in a single
> > transfer.  (HTTP or FTP)
> >
> > -- 
> > 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] Retrieving variable name?

2005-09-21 Thread Jeffrey Sambells
is it possible to retrieve the name of a variable passed into a 
function from within the function?


	//for example here can I determine that $input came from $a in the 
previous scope?

}

example($a);

?>


Jeffrey Sambells
Director of Research and Development
We-Create Inc.
519.897.2552 cell
519.745.7374 office
888.615.7374 toll free
http://www.wecreate.com

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



Re: [PHP] why memory limit is still being complained about?

2005-09-21 Thread Jeffrey Sambells
Not sure about Gallery or Apache 2 but Apache 1 uses different php.ini 
files for cli, cgi and mod_php. It could be that gallery checks using 
the command line version of php which has a different setting for 
memory limit? Seems silly but it's a thought.


Jeff

Jeffrey Sambells
Director of Research and Development

We-Create Inc.
519.897.2552 cell
519.745.7374 office
888.615.7374 toll free
http://www.wecreate.com

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



Re: [PHP] Re: Retrieving variable name?

2005-09-21 Thread Jeffrey Sambells

oh well, thanks for the help.

Jeffrey Sambells
Director of Research and Development

We-Create Inc.
519.897.2552 cell
519.745.7374 office
888.615.7374 toll free
http://www.wecreate.com

On 21-Sep-05, at 6:02 PM, Jake Gardner wrote:


Maybe something fancy with references?

http://us2.php.net/manual/en/language.references.php

On 9/21/05, Thorsten Suckow-Homberg <[EMAIL PROTECTED]> wrote:

Short Answer : No
Longer Answer : Maybe, if you have knowledge of PHP internals and a
willingness to write an extension. Even then it may not work.. 



Well, PHP5's magic methods __get()/ __set() could be used to resolve 
the

variable's name...

--
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] Trigger root script?

2005-09-26 Thread Jeffrey Sambells
I need a php script to trigger another script to run as root on a 
machine. Currently, the scripts run as the www-data user, but that 
means I can't modify any files on the system that aren't owned by 
www-data or world writable. I somehow need to trigger a php script to 
run as the root user. I thought of using a cron to watch for some 
indicator but that would mean there could be a one minute delay.  Any 
thoughts? Running php / linux and I have root access to the machine 
myself so i can set it up however I need to.


Thanks.

Jeff


--
Jeffrey Sambells
Director of Research and Development
We-Create Inc.
519.897.2552 cell
519.745.7374 office
888.615.7374 toll free
http://www.wecreate.com

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



Re: [PHP] passing a variable with php_self

2005-10-03 Thread Jeffrey Sambells


can someone show me the right way to do the following...




I want to pass a variable to a  self submitting link.

Thanks,








$PHP_SELF should not be used because it will not work without  
register_globals being enabled. Rather, you should use $_SERVER 
['PHP_SELF'] for it as above however...


Don't forget to check for XSS! Using PHP_SELF you could simply change  
the URL in the browser to:


/path/to/script.php">alert('hello');


-Jeff

~~~~~~
Jeffrey Sambells
Director of Research and Development
Zend Certified Engineer (ZCE)

We-Create Inc.
[EMAIL PROTECTED] email
519.745.7374 office
519.897.2552 mobile

~~
Get Mozilla Firefox at
http://spreadfirefox.com

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



Re: [PHP] passing a variable with php_self

2005-10-03 Thread Jeffrey Sambells

oops, that should be htmlentities, not htmlspecialchars.

- Jeff

On 3-Oct-05, at 11:51 AM, Jeffrey Sambells wrote:


$PHP_SELF should not be used because it will not work without  
register_globals being enabled. Rather, you should use $_SERVER 
['PHP_SELF'] for it as above however...


Don't forget to check for XSS! Using PHP_SELF you could simply  
change the URL in the browser to:


/path/to/script.php">alert('hello');




~~~~~~
Jeffrey Sambells
Director of Research and Development
Zend Certified Engineer (ZCE)

We-Create Inc. ~ Internet Solutions
http://wecreate.com
[EMAIL PROTECTED]
office: 519.745.7374
cell: 519.897.2552
~~
Get Mozilla Firefox at http://spreadfirefox.com/community/? 
q=affiliates&id=466&t=50

RE: [PHP] Mystery about chmod and permissions

2005-10-09 Thread Jeffrey Santos
To save on computing time, the results of the fileperms command are
cached... I assume when you run a new instance of the program, it uses a new
cache / old one is deleted when the first instance ends.  Either way, you
should clear the cache first:

clearstatcache();

echo "Directory permissions for $dirname:  ". substr(sprintf('%o',
fileperms($dirname)), -3). "  //reports 0755;

Give that a try

- Jeff
-Original Message-
From: Al [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 09, 2005 3:50 PM
To: php-general@lists.php.net
Subject: [PHP] Mystery about chmod and permissions

I've got a script that checks a directory's permissions for 757 and if they
are not correct, chmods them with a cgi script.

That part works just fine.  Can alternately switch the permissions from 755
to 757 and back. I can use a ftp utility to 
check the permissions and they are correct.

The mystery is that I have a permissions check following the chmod and it
reports the permissions that existed before 
the change.

snippets:

include "http://$server/cgi-bin/chg_perms.cgi?name=$fp_name&perms=$fperms";;
//e.g., $fperms= 0757;

[I've tried sleep(10) here; doesn't help]

echo "Directory permissions for $dirname:  ". substr(sprintf('%o',
fileperms($dirname)), -3). "  //reports 0755;

If I run the script again with the same permissions, the report shows the
correct permissions.

It's as if permissions check code is executed before the chmod; but it
isn't.  I've tried echoed the times for the chmod 
code and the permissions check and the chmod code is definitely before the
permissions check.

Anyone have an explanation.?

-- 
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] Having resource variables over several scripts

2005-10-10 Thread Jeffrey Santos
Ben,

If you grab the resource and store it in a variable, you certainly should be
able to send it via GET or POST.  For that matter, you should be able to
store the information in a SESSION variable too, so I'm not sure what is
going wrong.  Could you email the code you are using to grab the resource
variable and the code to store it in a session?


- Jeff

-Original Message-
From: Benjamin Mack [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 10, 2005 11:03 AM
To: php-general@lists.php.net
Subject: [PHP] Having resource variables over several scripts

Hey,

I am trying to have e.g. a file opened over several scripts. When 
opening a file with "fopen" I receive a variable of the type resource 
(like "Resource ID #3"), but when I try to save this variable in the 
SESSION and try to use it on another page, I get a "null" variable.

Because I need to have the same and exact resource (not opened every 
time I load a new page) and since it is apparently not possible to store 
it in a session, I wanted to ask if somebody had the same issue once, 
and maybe there is some help out there.
Could I somehow serialize the resource, then give it to another page via 
GET or POST?

I would really appreciate if somebody has some hints...

Thanks,
benni.
-SDG-

-- 
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] Having resource variables over several scripts

2005-10-10 Thread Jeffrey Santos

I was under the impression he was using the resource to get information then
trying to pass that information... rereading it makes it seem otherwise, so
sorry for the false information :-P  I've never actually tried passing
resources themselves among scripts so TG is most likely correct.  As far as
not exiting the script, that wouldn't seem very efficient and you might be
better off just reaccessing the resources as needed.

- Jeff
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 10, 2005 1:10 PM
To: php-general@lists.php.net
Subject: RE: [PHP] Having resource variables over several scripts

Ok, first let me disclaim that there are definitely a lot of people a lot
smarter than me out there who may have figured this one out already, but as
far as I know, resources like open file handles, database connection
handles, objects, etc..  but especially anything that returns a resource
number are not going to be carried over from one script execution to
another.

If I recall properly, lets say script1.php opens a file, that's resource #1,
then it opens a database connection, that's resource #2, etc..

Now let's say script2.php opens a database connection first, that's resource
#1 for that script, then opens another database connection, that's resource
#2, now it opens a file, that's resource #3..   

So the 'resource' number isn't tied to a certain type of handle (file, db
connection, etc), it's based on the order of resources allocated.

That's only semi-related to what you're talking about, but thought it was
worth mentioning.

But I believe all of these resources are freed up as soon as the script
finishes executing thereby necessitating re-opening files, db connections,
recreating objects, (maybe objects can be serialized, I forget) when the
next script is executed.  No carry-over possible.


The solution?  Don't exit the script.  Unfortunately in an web environment
you can't really keep a php script executing unless you create a php based
server that your scripts connect to (doesn't have to be php based really..
just any server that listens and can keep files open for as long as they're
needed).

Or maybe try to consolidate your file operations, in this case, so you can
do it all in one pass.  Don't open a file, read one little thing, close
it...  re-open it.. read something else... close it..  user makes changes..
opens file again.. writes changes.. closes it.  read once and write
once..See if you can streamline it somehow.

Just some thoughts off the top of my head.  Again, maybe someone else has a
better answer, but I can't see how you'd avoid opening and closing each time
unless you had a back-end server type program running.

-TG

= = = Original message = = =

Ben,

If you grab the resource and store it in a variable, you certainly should be
able to send it via GET or POST.  For that matter, you should be able to
store the information in a SESSION variable too, so I'm not sure what is
going wrong.  Could you email the code you are using to grab the resource
variable and the code to store it in a session?


- Jeff

-Original Message-
From: Benjamin Mack [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 10, 2005 11:03 AM
To: php-general@lists.php.net
Subject: [PHP] Having resource variables over several scripts

Hey,

I am trying to have e.g. a file opened over several scripts. When 
opening a file with "fopen" I receive a variable of the type resource 
(like "Resource ID #3"), but when I try to save this variable in the 
SESSION and try to use it on another page, I get a "null" variable.

Because I need to have the same and exact resource (not opened every 
time I load a new page) and since it is apparently not possible to store 
it in a session, I wanted to ask if somebody had the same issue once, 
and maybe there is some help out there.
Could I somehow serialize the resource, then give it to another page via 
GET or POST?

I would really appreciate if somebody has some hints...

Thanks,
benni.
-SDG-

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


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.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] storing passwords in $_SESSION

2005-10-10 Thread Jeffrey Santos
Why not store a cookie and session variable with a randomly generated ID
code (see uniqid function in manuals) then just check to see if one is equal
to the other on your "relogin"  This way you don't record any "personal"
user information and can still do an autologin type script.

- Jeff

-Original Message-
From: Dan Brow [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 10, 2005 4:51 PM
To: PHP-Users
Subject: Re: [PHP] storing passwords in $_SESSION

Sorry for the confusion, I should have changed the subject line to
reflect my new idea.

Thanks.

On Mon, 2005-10-10 at 22:03 +0200, Emil Novak wrote:
> Oh, just username... That's good idea.
> 
> Emil NOVAK
> LAMP Developer
> 
> On 10/10/05, Dan Brow <[EMAIL PROTECTED]> wrote:
> > I was meaning just the username, not the password, still the same issue?
> >
> > On Mon, 2005-10-10 at 21:35 +0200, Emil Novak wrote:
> > > Yet another unsafe way... You can try to write a program that reads
> > > stored cookies in Temporary Internet Files - it's peace of cake for
> > > somebody that is advanced programmer. The best way is to "eliminate"
> > > lazy users - you simply do not implement "auto login". It's the
> > > fastest, safest and the easiest way to solve the problem.
> > >
> > > Emil NOVAK
> > > LAMP Developer
> > >
> > > On 10/10/05, Dan Brow <[EMAIL PROTECTED]> wrote:
> > > > Well, um. ya. Back to the drawing board.  Save it in a cookie?
> > > >
> > > > On Mon, 2005-10-10 at 14:59 -0400, Kilbride, James wrote:
> > > > > If the session expired.. how will session hold their user id??
> > > > >
> > > > > > -Original Message-
> > > > > > From: Dan Brow [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Monday, October 10, 2005 3:05 PM
> > > > > > To: PHP-Users
> > > > > > Subject: Re: [PHP] storing passwords in $_SESSION
> > > > > >
> > > > > > Thanks, figured that would be the case. Can't for life of me
> > > > > > think why I wanted to do that, must have had a brain
> > > > > > infarction. I want to have an expired session prompt so
> > > > > > people can log back in with out having to start at the login
> > > > > > page. Would having the users login saved in $_SESSION be
> > > > > > alright? prompt them for their password and compare it with
> > > > > > the password in the DB be fine? I want to reduce the amount
> > > > > > of typing someone has to do when a session expires.
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > > --
> > > > > > PHP General Mailing List (http://www.php.net/) To
> > > > > > unsubscribe, visit: http://www.php.net/unsub.php
> > > > > >
> > > > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 
> --
> Emil NOVAK, razvijalec distribucije Slonix
> 

-- 
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] PDO & pgsql?

2005-10-11 Thread Jeffrey Sambells
I've been playing with the new PDO stuff in PHP 5.1 and am having  
trouble running queries on our database.


I've installed PDO and pdo_pgsql through the pear/pecl installer and  
am trying to use a PostgreSQL 8.x DB. The connection is created fine,  
logged in etc. but when I try to run a query I get a generic SQL  
HY000 error. On the database server, the postgres log reports:



ERROR:  prepared statement "pdo_pgsql_stmt_081ed42c" does not exist


and here's a bit of additional debug stuff from PHP and PDO:


PDO_ATTR_ERRMODE: 0
PDO_ATTR_CLIENT_VERSION: 8.0.2
PDO_ATTR_CONNECTION_STATUS: Connection OK; waiting to send.
PDO_ATTR_SERVER_VERSION: PostgreSQL 8.0.3 on i686-pc-linux-gnu,  
compiled by GCC gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)


and errorInfo() returns:

array(3) {
  [0]=>
  string(5) "HY000"
  [1]=>
  int(7)
  [2]=>
  string(0) ""
}



I am thinking it is something in the PDO_pgsql extension but thought  
I'd ask if anyone has any ideas why it's not working?


Thanks.

-Jeff

~~
Jeffrey Sambells
Director of Research and Development
Zend Certified Engineer (ZCE)

We-Create Inc.
[EMAIL PROTECTED] email
519.745.7374 office
519.897.2552 mobile

~~
Get Mozilla Firefox at
http://spreadfirefox.com

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



Re: [PHP] Using PHP for accsess control, preventing access to staticfiles

2005-10-27 Thread Jeffrey Sambells
I ran into a similar problem and came up with a slightly different  
solution...


As an alternative to passing the file directly through PHP, if you  
are running apache, you could DENY access to all files in a directory  
and then use PHP to dynamically update a local .htaccess file with  
valid sessions and use something like mod_security or a simple cookie/ 
query_string check to see if the requested file has a valid session.  
Then apache would handle the download as normal so users could use  
whatever download mechanism they want.


- jeff

~~
Jeffrey Sambells
Director of Research and Development
Zend Certified Engineer (ZCE)

We-Create Inc.
[EMAIL PROTECTED] email
519.745.7374 office
519.897.2552 mobile

~~
Get Mozilla Firefox at
http://spreadfirefox.com

On 27-Oct-05, at 5:45 PM, Dan Trainor wrote:


Ben wrote:


Dan Trainor said the following on 10/27/2005 01:34 PM:



Ben wrote:


Move the files outside the document root so that they aren't  
available

via a direct URL, then create a 'file access page' in php that will
check for the session variable and either send or not send the file
based on whether the user has access.

- Ben





Ben -

I knew this, but it was the "send or not send" thing that I was
concerned about ;)




Sounds like you need to have a look here:
http://ca3.php.net/manual/en/ref.filesystem.php

and specifically here:
http://ca3.php.net/manual/en/function.fpassthru.php

and so you can set the proper headers:
http://ca3.php.net/manual/en/function.filetype.php

The on-line manual is your friend :-).

Also, you will want to be _very_ careful about ensuring that the file
you are sending is in fact the file you want to be sending (ie
/etc/passwd would be a no-no).

- Ben




Ben -

Yes, I've been playing with passthru() today, and it's quite
interesting.  I think it's going to work.  I made a little pass- 
through

(pardon the pun) scriupt to do exactly what I'm looking for.

I've already started working on a set of sanity checks and such for  
the

requested files to prevent such malicious activity.

I want to thank you all again for your help.

Thanks!
-dant

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






[PHP] Regex for balanced brackets?

2005-11-21 Thread Jeffrey Sambells

I came across this method of matching brackets with regex in .NET

http://puzzleware.net/blogs/archive/2005/08/13/22.aspx

but I am wondering if it is possible to do the same in PHP?

I've tried it a bit but I can't seem to get it to work properly. I'm  
just wondering if I am doing something wrong or if it is just not  
possible.


Thanks.

here is the code I was playing with:


[^{}]+
|
\{ (?P)
|
\} (?P<-DEPTH>)
)*
(?(DEPTH)(?!))

\}
PATTERN;

$subject = <<


- Jeff



~~~~~~
Jeffrey Sambells
Director of Research and Development
Zend Certified Engineer (ZCE)

We-Create Inc.
[EMAIL PROTECTED] email
519.745.7374 office
519.897.2552 mobile

~~
Get Mozilla Firefox at
http://spreadfirefox.com

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



[PHP] Class Constant PHP 5

2005-12-07 Thread Jeffrey Sambells
is there a way to dynamically define a class constant during runtime  
in PHP 5?


for example I would like to achieve the result of something like:

class Example {
const FOO = bar();
}

However this would obviously give a parse error.

I know it is possible with variables but I would like it to be a  
constant.


Thanks.

- Jeff

~~
Jeffrey Sambells
Director of Research and Development
Zend Certified Engineer (ZCE)

We-Create Inc.
[EMAIL PROTECTED] email
519.745.7374 office
519.897.2552 mobile

~~
Get Mozilla Firefox at
http://spreadfirefox.com



Re: [PHP] Class Constant PHP 5

2005-12-07 Thread Jeffrey Sambells
The point was more that the constant's value is 'defined' at the 
beginning of the script, and is constant and non changing throughout 
the entire execution of the script. But I was looking for a way to give 
it a namespace inside a class rather than just defining in in the 
global scope so that I do not have to worry about conflicting names 
with other packages such as PEAR et al.


I wanted to do something like:



so that I I could later use the notation

$value =  ClassName::ConstantName

or from within the class

$value =  self::ConstantName

and ensure other developers could not change the value of the constant.
To achieve the result I want I could do:



But that just seems pointless and messy. I will assume that the simple 
answer to my original question was 'No that it is not possible'.


Thanks

- Jeff

Jeffrey Sambells
cell 519.897.2552
phone 905.878.4701
web http://www.sambells.info

On 7-Dec-05, at 1:22 PM, Jay Blanchard wrote:


[snip]
is there a way to dynamically define a class constant during runtime
in PHP 5?

for example I would like to achieve the result of something like:

class Example {
const FOO = bar();
}

However this would obviously give a parse error.

I know it is possible with variables but I would like it to be a
constant.
[/snip]

Well, first of all the syntax you describe above does not define a 
constant

at all, you would need to use define()

The second thing is good old basic OOP theory, you should declare a 
private

static variable

http://us3.php.net/private
http://us3.php.net/manual/en/language.oop5.static.php

Of course you could define a global constant and then pass it into your
object when instantiating it, but that is a bad idea generally.

Thirdly, you could never use a function to derive your constant 
value...it

would then be an oxymoron. If the value generated by the function bar()
changes, FOO is a variable. Constants are for simple values. For 
instance,

we can all agree that pi is 3.14159 (to 5 decimal places, so defining a
constant pi makes sense;

define("PI", 3.14159);

If we do not know what the outcome of a function will be it makes the 
value

of the outcome a variable, always. It would be foolish (and would fail
anyhow) to do something like this;

define("RANDOM", rand(5,12));



Re: [PHP] PHP Warning: imagettftext() expects parameter 2 to be double

2005-12-07 Thread Jeffrey Sambells
You've got 83px in you XML file for the fontsize. the 'px' is messing  
it up change it to just 83 in the XML file or cast the value to (float)  
which will extract the 83 and remove the px:



foreach ($xml->textblock as $text) {

$fontsize=(float)$text->fontsize;
$fontangle=(float)$text->fontangle;
$fontxpos=(int)$text->fontxpos;
$fontypos=(int)$text->fontypos;
$text=$text->text;

		 
imagettftext($image['png'],$fontsize,$fontangle,$fontxpos,$fontypos,$fon 
t['color'],$font['type'],"$text",array());


}


- Jeff

On 7-Dec-05, at 7:06 AM, James wrote:


Hi,

 Thank you for getting back to me, your the first.

 The array works fine – I have tested it using var_dump().

 Attached are the two files – xml.test – this holds the array of the  
text blocks which is being parsed by image.php.


 Line 38 is the problem, if you comment around the foreach() statement  
and un-comment the commented lines you should see it working fine, its  
when its within the foreach statement when it errors.


 Regards,

 James


 Jochem Maas Wrote:


James wrote:
 > Hi there,
 >
 > I have been using the GD functions from PHP5.0 on Mac OS X.
 >
 > I have a simple script that creates a PNG image with text on the  
image using

 > fonts using FreeType 2.
 >
 > I am trying to use the imagettftext() function within a foreach  
loop – but I

 > get the following error:
 >
 > PHP Warning:  imagettftext() expects parameter 2 to be double

 what does paramter 2 contain in each case? var_dump(), print_r(),  
echo ?!?


 >
 > The code is as follows:
 >
 > $font['type']="./fonts/font.ttf”;
 >
 > 
 >  
$font['color']=imageColorAllocate($card['png'],$font['hexcolor']['r'], 
$font[

 > 'hexcolor']['g'],$font['hexcolor']['b']);
 >
 > imageFill($card['png'],0,0,$card['color']);
 >
 > foreach ($xml->textblock as $text) {
 > $fontsize=$text->fontsize;    $fontangle=$text->fontangle;
 > $fontxpos=$text->fontxpos;    $fontypos=$text->fontypos;
 > $text=$text->text;

 try var_dump($text); or print_r($text); to see what you have
 (if its an XML node object - dump $fontsize, $fontxpos instead!!!)

 >  
imagettftext($image['png'],$fontsize,$fontangle,$fontxpos,$fontypos,$f 
ont['c

 > olor'],$font['type'],$text);    }
 >
 > It works fine if I add just one line outside of the loop – but as  
soon as

 > its within the loop it errors.
 >
 > Cheers,
 >
 > James
 >


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

Re: [PHP] detecting file size

2005-12-12 Thread Jeffrey Sambells
The php script starts to execute AFTER the file has already been 
uploaded so the quick answer is no you can't get the file size prior to 
the upload finishing (in PHP). I fought with a similar problem and 
ended up implementing the uploading portion of a script using perl 
which has access to the file as it is uploading.


Jeff


On 12-Dec-05, at 4:26 PM, Jay Blanchard wrote:


[snip]
i am making a form to upload files to server
i know i can detect the file size after being uploaded, but i do want
to detect the file after it is being uploaded to the server.
is there anyway i can do this ?
[/snip]

You can detect file size on the client side with JavaScript, this may 
help;

http://www.codeproject.com/jscript/search_in_files.asp

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



Re: [PHP] installing php5 on os x and CLI version

2006-01-09 Thread Jeffrey Sambells
php runs out of /usr/bin/php but entropy.ch installs into /usr/local/ 
php5 so you want to run /usr/local/php5/bin/php  (on my system i  
symlinked the two so they are the same).


-jeff

~~
Jeffrey Sambells
Director of Research and Development
Zend Certified Engineer (ZCE)

We-Create Inc.
[EMAIL PROTECTED]
~~
Get Mozilla Firefox at
http://spreadfirefox.com

On 7-Jan-06, at 6:28 PM, jonathan wrote:


Sorry if this is a newbie question.

I installed php5 via the .dmg from entropy.ch. It installs fine as  
an apache module but the cli doesn't appear to be working by  
running php -v . Does  anyone know how I would fix this?


thanks for any help,

jonathan

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





[PHP] Grouping

2006-01-19 Thread Jeffrey Pearson
OK. I know I did this a LONG time ago but I don't remember how I did  
it. Thus, my post.


I have a list of last names from a MySQL database. I need to display  
them grouped by the first letter of their last names and insert a  
separator on display. Similar to a phone book. So it looks like;



A
___
Adams
Apple
Army

B
__
Banjo
Bank
Bark

C
__
Captain
Car



Is there a way without jumping through too many hoops?

Thanks for any input you can give.

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



Re: [PHP] Determining number of days in a selected month

2006-01-20 Thread Jeffrey Pearson
The java mailing list I belong to recently had this same  
conversation. I didn't know php had that ability built in. Java  
doesn't (score another one for php). The cleanest solution I saw on  
the Java list that would be non-language specific (in other words,  
the same logic can be implemented in ANY language) would be to set a  
variable to the first day of the month AHEAD of the month you want.  
For example, if your looking for February, 2000, set the variable to  
be March 1st, 2000. Then subtract 1 day. I have actually archived  
this solution in my own little knowledge base as I thought it was  
quite clever.



Hope this helps other people as well.


Jeff Pearson








On Jan 20, 2006, at 8:17 AM, <[EMAIL PROTECTED]> [EMAIL PROTECTED]> wrote:



date("t") will give you the number of days in the current month.

Or you can do:

date("t", mktime(0, 0, 0, $month, $day, $year))


to get the number of days in a specific month in a specific year  
(that way you can get leap year accurate counts..)


-TG

= = = Original message = = =

Is there a way to easily tell PHP how many days there are in a  
selected

month without writing the following out for each month:

if($Month == "January")
~$NumberOfDays = 31;

elseif($Month == "February")
~if($Year == "A Leap Year")
~~$NumberOfDays = 29;
~
~elseif($Year != "A Leap Year")
~~$NumberOfDays = 28;
~

elseif($Month == "March")
~$NumberOfDays = 31;

and so on, and so on, and so on

I would greatly appreciate any help.  Thanks.



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


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



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



[PHP] undefined symbol: __dn_expand ???

2001-02-06 Thread Jeffrey Dyer

Hey,
I'm on Mandrake 7.1.  I installed PHP 4.0 without any errors, using the following:
./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs 
--with-gnu-ld
make
make install

It seemed to go fine -- no errors during installation, however, when I try to start 
apache I get the following error:
Syntax error on line 207 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: 
/usr/local/apache/libexec/libphp4.so: undefined symbol: __dn_expand
./apachectl start: httpd could not be started
 
I've searched the internet all day, I can't find much reference on __dn_expand... I'm 
out of ideas so if anyone has any ideas on what might be wrong, please reply.
 
Thanks for your time,
-Jeff



[PHP] Function passed as argument to function

2002-11-30 Thread Jeffrey B . Ferland
std_layout("Title here", list_writings(poetry))

both std_layout and list_writings are user-defined functions. std_layout() 
echo's the two arguments that it takes at select points in its execution. I 
want to the output of list_writings()  to be an argument for std_layout().

-Jeff
SIG: HUP

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




Re: [PHP] Function passed as argument to function

2002-11-30 Thread Jeffrey B . Ferland
On Saturday 30 November 2002 03:14 pm, you wrote:
> On Sunday 01 December 2002 03:54, Jeffrey B.Ferland wrote:
> > std_layout("Title here", list_writings(poetry))
> >
> > both std_layout and list_writings are user-defined functions.
> > std_layout() echo's the two arguments that it takes at select points in
> > its execution. I want to the output of list_writings()  to be an argument
> > for std_layout().
>
> Hmm, what's the problem then?
>
> Functions take any valid expressions as arguments. If list_writings()
> returns a valid expression then you should have no problems at all.

For reference, see http://autocracy.homelinux.org/template.php and 
http://autocracy.homelinux.org/error.php

template.php is the proper layout, and uses the same code as 
error.php, with the exception that "LEFT SIDE TEXT" has been replaced with 
'list_writings(poetry)'. Note that the output from that function occurs where 
it was placed within the code, not where it was called to...

Basically, instead of the output from list_writings(poetry) being passed to 
the function, it simply executes.

-Jeff
SIG: HUP

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




Re: [PHP] Function passed as argument to function

2002-12-01 Thread Jeffrey B. Ferland
> > For reference, see http://autocracy.homelinux.org/template.php and
> > http://autocracy.homelinux.org/error.php
>
> Unless you have a good reason to do otherwise please post your code here.
> People would be less inclined to help if they have to go about clicking on
> links to see what your problem is.

Noted

> 1) Do you really mean list_writings(poetry), or did you in fact mean
> list_writings($poetry)?

list_writings(poetry); or more accurately std_layout("Recent Writings",
list_writings(poetry)); I've also tried that using various methods of
quoting for the list_writings(poetry) and also doing strange things like
making anonymous functions and defining the function as a variable and
what-not.

> 2) How did you conclude that? Did you check that
> list_writings(poetry)/list_writings($poetry) gives the correct result? IE
> echo list_writings(poetry)/list_writings($poetry) ?

list_writings(poetry) simply spits out the output. 'echo
list_writings(poetry)' was not designed as the proper way to use the
command. Here is the current code for the function (in its half-complete but
working state with mysql_connect() and mysql_select_db replaced with generic
variables for public consumption), and also the std_layout function
following:

function list_writings($table) {
$db_link = mysql_connect($host, $user, $pw)
or die("DB connect failure");
mysql_select_db ($db_name) ;
$query = "SELECT wid, title, description FROM $table ORDER BY wid DESC LIMIT
15";
$result = mysql_query($query, $db_link);
while ($row = mysql_fetch_row ($result))
{
print "$row[1]";
};
};

function std_layout($ltitle, $ltext) {
echo "

  

  

  
  $ltitle
  


  
$ltext
  

  

" ;
} ;

Basically, I want std_layout to be able to take either straight text as an
argument or the output of a function (even if it's through a mid-point such
as a variable). That failing I'm going to have to admit a design flaw to
myself and re-work the code...

-Jeff
SIG: HUP


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




Re: [PHP] Guestbook

2002-12-01 Thread Jeffrey B. Ferland
> The quick solution, if you intend to continue the autoincrement field, is
to
> number the entries manually when you're displaying them: Something along
the
> lines of:
>
>   $count = 0;
>   while ($row(mysql_fetch_array($result_id))) {
> $count++;
> echo "Entry $count";
> ...
> ...
>   }

The right solution (and not much slower) is to use a different table type
for your DB. Read up on what different tables types in your DB support. Note
that this won't make any difference if the one you're deleting isn't the
last one in the series... there basically isn't a work-around for that which
doesn't eat proc time.

-Jeff
SIG: HUP


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




Re: [PHP] MySQL vs PostgreSQL

2003-01-06 Thread Jeffrey B. Ferland
> > I'm just deciding which DB to use for my projects and I'm not clear with
one
> > thing... When considering a database for web, is MySQL good enough? I
read
> > it only supports table locking, which is not very satisfying in such a
> > multiuser environment as the internet..
>
> PostgreSQL has transactions and locks single records - MySQL locks
> whole tables.
> I read something like this: "MySQL is more popular because a lot
> application is made in MySQL. If you make a new application from the
> base - choose PostgreSQL".

See MySQL 4.x. They also have subselects now (HUGE!). As for an
understanding of the importance of row locking vs. table locking, it's
probably only going to be an issue if you're recieving a large number of
hits per second that actually need to lock records. Be sure to read up on
the different table types that are available and their features. It would
help if we had a better idea of the goal of your application (EG slashdot
doesn't need to lock its user records, etc.). Or it wouldn't matter much if
you used 4.x.

> > Based on your experience, what are pros and cons of MySQL and why most
of
> > you prefer to use MySQL to PostgreSQL, which is aparently more
powerful..

Honestly? MySQL seems to be more actively used, and more actively developed,
and has more programs with hooks for it (even though SQL should be truly
universal *sigh*). And I just like it. Didn't really need anything
PostgreSQL had to offer at the time, and when it comes that I do need things
like subselects, I'll just upgrade my version.

-Jeff
SIG: HUP


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




Re: [PHP] MySQL vs PostgreSQL

2003-01-06 Thread Jeffrey B. Ferland
> Not to cause a flame war, but, MySQL and PostgreSQL are both excellent
> choices, MySQL tends to be a lighter less feature rich database while
> PostgreSQL tends to have more features, perform better under load, etc.

Under differing types of load, yes. MySQL is more hit-based, while
PostgreSQL deals well with bigger queries. So basically undisputed.

> You can read a lot about the two databases at google.com and also at
> postgresql.org.
>
> I highly dispute the claim that MySQL is more actively used or that it
> is more actively developed, PostgreSQL has a very good sized user base
> with a lot of both non commericial community support and commericial
> quality support.

PostgreSQL does have its own significant user base. I think MySQL has a
larger user base. Of course, I won't state that user base is a heavily
weighted factor in this case (or in most).

> There are a large number of applications that use postgres as well, even
> if there weren't the reasoning "there are lots of applications that use
> this product so it must be good" is amazing to me, if that were true
> Windows would be the winner because there is the most commercial support
> for windows, there is also the most applications for windows so
> therefore windows must be better than Unix (we all know that is not
> true, at least in most cases).
>
> This is not intended to cause a flame, just to balance the comments, as
> always you should do your own benchmarking or at least do in dept
> research before deciding on any solution.  Your mileage will vary so
> take other people's advice carefully, in the end look at performance,
> stability, ability to scale, and support.

My understanding is for speed / fast + simple queries go with MySQL. Heavier
or more complex / long queries go with PostgreSQL. I'm biased to MySQL
(though unhappy with lack of subselects, but have found that I can sometimes
write better queries when forced to avoid them), so take with a large dose
of salt. As for the comment about subselects in version 4 being available,
well... I am right that they are... but they're sorta not out yet as was
stated so... well, let's just say my words taste bitter on the way back down
*sigh*

-Jeff
SIG: HUP


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




Re: [PHP] Suggestions on FAQ application?

2003-01-11 Thread Jeffrey B. Ferland
> Why re-invent what is already written? I'm well aware that it's easy to
> write but there may be something out there already that suits my needs and
> has some features that I hadn't thought of. If you don't have a suggestion
> on a package please spare me the rude replies which seem to run rampant on
> here lately...

Though I agree the reply given was rather crude, and I think also
unnecessary, so was you question. It is rather a waste of the time of the
list's membership to spend their time doing searches for you to find code
packages. It is my impression, at least, that this list exists to provide
assistance on a somewhat higher level of issues. Your question was worded in
such a way that it wasn't very different from this:

> Hi every one,
> I want to create thumbnail of a photo stored in MySQL table online.
>
> Best Wishes,
> S. Naqashzade

And that is not something I care to bother with. I spent the effort of
typing "php thumbnail mysql photo" into Google. And as a surprise to some, I
had to refine the search once to get that, and what you're looking for
you'll sometimes have to scroll down for or *gasp* even head to the next 10
results.

I suggest going to Google's directory:
http://directory.google.com/Top/Computers/Programming/Languages/PHP/Scripts/
try doing a search for FAQ. Since I really don't know what it is you want, I
can't help much more than that. The basic idea is spend some time searching,
look inside of well-known script sites, dig through the search enginges...
You might also be able to strip the FAQ section out of PHP Nuke, but that's
a confusing mess in its own right. Forgive my bitterness, but Sometimes you
end up looking at a question and going "Why am I wasting my time on this?
This person expects me to do everything but make their site."

Don't straight-up ask for info on questions that are covered EVERY WEEK, and
do look at more than just one site.

-Jeff
SIG: HUP


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




Re: [PHP] count characters without space

2003-01-11 Thread Jeffrey B. Ferland
> who knowes how to count the charcaters in a string without the space
> character?

Using a regular expression to strip out all the spaces before passing to the
word counting function seems easiest. You'll be left to adapt it to PHP, but
the regexp is: 's/ //g' That removes all spaces. If it gives an error, try
s/\ //g to escape the space. Pass the result to whatever you use to count
the number of characters.

-Jeff
SIG: HUP


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




[PHP] does anyone know how to tell if a PHP scrip is being executed from the command line not a server HTTP request??

2003-07-06 Thread Jeffrey D. Means
I am trying to write a script but for security I need to verify that it is
not executed by a web server.  At this point I have just placed it outside
the htdocs tree but would like to build into the script a test to die if it
is being executed by a web server.

Thanks

Jeff Means
CIO for MeansPC
[EMAIL PROTECTED]


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



[PHP] anyone have any idea as to how to display a message after a page has started loading??

2003-08-22 Thread Jeffrey D. Means
I am looking for a way to say please wait generating thumbnails... while
actually doing so.  I have tried calling the JavaScript alert() function
before starting the image processing but it waits for the page to
complete loading before displaying the alert box.  anyone have any ideas
on this??  BTW: at the time I am trying to display a message I have
already started output to the browser.
 
---
Jeffrey D. Means
CIO for MeansPC
[EMAIL PROTECTED]
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
 


[PHP] RE: [users@httpd] RE: Can't POST over 500K

2003-08-24 Thread Jeffrey D. Means
This is not an apache proble it is a problem with your php.ini file.  In
this file there is a line that specifies how large of POST data can be
received, the default is 500k.  If you are running apache 2.0 there is
an additional place where this might be being defined.  You can find
this file in the conf.d directory where your config files for apache
live mine is /etc/httpd/conf.d/php.conf  I hope this helps.

-Original Message-
From: Caldwell Sgt Brandon L [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2003 1:17 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [EMAIL PROTECTED] RE: Can't POST over 500K


It really seems like apache isn't letting me post over 500kb. Here is
the sample code I used to test this problem independantly from the
bulletin board software:

  
 
 
  

I may have to break down and send this in chunks, but it really seems
that shouldn't be required. As for my phpinfo() response, it list 20M
which is what is in php.ini. I've gone all the way up to 200M just to be
sure.

-Original Message-
From: Leif W [mailto:[EMAIL PROTECTED]
Sent: Friday, August 22, 2003 9:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [EMAIL PROTECTED] RE: Can't POST over 500K


If it is in fact a timeout issue, you may want to consider either
breaking up the file into smaller chunks and reassembling on the server,
or have the script only read so much, then stop and alert the client
with a page with a refresh and some javascript to resubmit the file
again, and have the server seek to the right position and read another
chunk of data, and so on until the file is done.  Not sure how to do it
in PHP.  I think PHP doesn't let you get at the system reads for a file
upload, it just does it and sticks it in $_FILES.  But Perl will let you
do such a thing, as there's no built-in mechanism for file uploads, it
has to be coded, or use some module.

Leif

- Original Message - 
From: "Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 9:36 AM
Subject: Re: [EMAIL PROTECTED] RE: Can't POST over 500K


> At 06:30 AM 8/22/2003, you wrote:
> >So no one else has anything suggestions on this?
> >
> >-Original Message-
> >From: Caldwell Sgt Brandon L
> >Sent: Wednesday, August 20, 2003 7:46 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: Can't POST over 500K
> >
> >
> > Not sure if this is Apache or PHP, but I'm leaning towards
Apache.
> >I'm using Invision Power Board (also phpBB), and whenever I attempt 
> >to upload a file, I am limited to 500KB files.  I've changed all the 
> >setting
in
> >php.ini as well as the settings in each of the respective BB
configurations.
> >The error varies per browser: IE returns page not found; Mozzilla 
> >return "The document has no data."; Konqueror responds with a lost
connection.
> > I'm using Apache 2.0.40 with PHP 4 on a RedHat 9.0 server.
Thanks
>
> Someone else would be better suited then me to point you were to 
> change it (whether Apache or PHP or the Bulletin Board software), but 
> I would check time-out settings.
>
> 500kb files are pretty large, even for Cable, ISDN and DSL 
> connections. I just uploaded a 700+kb file to one of our servers (in 
> my case I used a
Miva
> applet I wrote some years ago to upload the file).
>
> I'm on business DSL (typically faster than residential DSL services) 
> and that 700+kb file took awhile to upload. I didn't time it (I should

> have - duh). While it didn't take minutes, it wasn't "near 
> instantaneous" either.
>
> So rather than checking for a "size limit", it might be worth looking 
> into a potential low time-out setting somewhere in your configuration 
> or application(s).
>
> Hope that helps.
> -mike
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server 
> Project. See http://httpd.apache.org/userslist.html> for more 
> info. To unsubscribe, e-mail: [EMAIL PROTECTED]
>"   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
The official User-To-User support forum of the Apache HTTP Server
Project. See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
The official User-To-User support forum of the Apache HTTP Server
Project. See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
 

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Viru

[PHP] Opening a Dynamic Pop Up Window

2003-05-30 Thread Jeffrey L. Fitzgerald
	Help! :-)

	Have a need for a pop up window to show images when the thumbnail is 
clicked. But the script I found only shows the image and no background, 
etc. I want to be able to have the pop up open and then send it a php 
created dynamic page with the proper html and image.

	In perl I know how to do this, by calling a perl script, sending the 
filename variable and returning with a generated page. But I am not as 
familiar with PHP. Here is the script I found:

	http://www.ciarasprettygoodpictures.com/gallery.php

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


Re: [PHP] Re: Opening a Dynamic Pop Up Window

2003-05-30 Thread Jeffrey L. Fitzgerald
First thanks for your help!..   I have the variable passing OK to 
this html page below. But the filename is not making it to the  
tag. I think the syntax is off??  I'm thinking maybe the img src tage needs 
to be broken up to allow the $image var to process?





Test image



$image = $_GET['img'];
echo "";
?>



Just add some Javascript to the links around your thumbnails, like this:



Then you need to create a script called show_photo.php that takes the "img"
var passed by the Javascript above and loads that image onto the page.
$image = $_GET['img'];

echo "";

Hope that helps.

Monty


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


Re: [PHP] Re: Opening a Dynamic Pop Up Window

2003-05-30 Thread Jeffrey L. Fitzgerald
Actually, I just found out we run PHP 4.0.6... Will the query 
string/GET process still work? Right now it's not and I thought I saw in 
the docs that the POST/GET isn't in pre 4.1...


Just add some Javascript to the links around your thumbnails, like this:



Then you need to create a script called show_photo.php that takes the "img"
var passed by the Javascript above and loads that image onto the page.
$image = $_GET['img'];

echo "";

Hope that helps.

Monty


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


[PHP] "Email This Story" and "Print" Functions

2003-05-30 Thread Jeffrey L. Fitzgerald
	Thanks to Kevin, Monty and the others who helped with my earlier post...

	Anyone have experience with PHP based "Email This Story" and "Print This 
Story" functions?? I am looking to add these along with a digital postcard 
mailer. 

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


[PHP] imap_open() and courier-imap server

2003-06-25 Thread Jeffrey D. Means
This code does not work with my system.  Any ideas as for a work arround??

--code starts
$config["imap_server"] = "bast.picotech.net";
$config["imap_port"] = 143;
$mailbox = "INBOX";
$login["username"] = "myusername";
$login["password"] = "mypassword";
$servername = "{" . $config["imap_server"] . ":" . $config["imap_port"] .
"}" . $mailbox.".";
$mbox = imap_open( $servername, $login["username"], $login["password"] );
--code ends

Jeff Means
CIO for Picotech
[EMAIL PROTECTED]


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



[PHP] PHP and https no working recieving cookies and header info how to fix needed.

2002-09-27 Thread Jeffrey D. Means

I am using PHP 4.2.3 with Apache-SSL 1.3.26 and need some advice on how
to get my scripts to receive the cookies that I am setting along with
the POST and GET values from the preceding form.  How do I go about this
task?  My thanks in advance for any help offered as I am totally
stumped.
 
Jeff Means
[EMAIL PROTECTED]



RE: [PHP] looking for a PHP editor

2001-01-09 Thread Jeffrey A. Stuart

Nope!  CodeCharge!

--
Jeff (FurBall)
WebOverdrive Newbie Tech Board
http://www.topniche.com/tech/
[EMAIL PROTECTED]

-Original Message-
From: Brad Hubbard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 09, 2001 6:11 PM
To: Jeffrey A. Stuart; PHP is not a drug .
Subject: Re: [PHP] looking for a PHP editor

> It's even better than sex... (Well... maybe LOL)  I got it myself and have
fallen in love with it in about 3 days!
>

What is it? HTML-Kit?

Cheers,
Brad


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




RE: [PHP] looking for a PHP editor

2001-01-09 Thread Jeffrey A. Stuart

Yes, we're subscribed to their beta mailing list.  The URL to their mailing
list is on their site.

--
Jeff (FurBall)
WebOverdrive Newbie Tech Board
http://www.topniche.com/tech/
[EMAIL PROTECTED]

-Original Message-
From: Josh G [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 09, 2001 8:29 PM
To: Jeffrey A. Stuart; Brad Hubbard; PHP is not a drug .
Subject: Re: [PHP] looking for a PHP editor

I went to their homepage, and couldn't find a link to download
the actual program, just some example stuff, and it says "coming
soon"... Is it out there somewhere and I'm just retarded, or are
you mob on a beta list or something???

Gfunk

   My name was Brian McGee,
   I stayed up listening to Queen,
   When I was seventeen.

http://www.gfunk007.com/


- Original Message -
From: "Jeffrey A. Stuart" <[EMAIL PROTECTED]>
To: "Brad Hubbard" <[EMAIL PROTECTED]>; "PHP is not a drug ."
<[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 12:26 PM
Subject: RE: [PHP] looking for a PHP editor


> Nope!  CodeCharge!



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




Re: [PHP] Good Free PHP Editor?

2001-03-16 Thread Jeffrey A . Stuart

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
> On 12 Mar 2001 03:51:13 -0800, [EMAIL PROTECTED] (Nick Davies) wrote:
> 
> >How about linux ones?
> >
> >I just tend to use vim or emacs but i'm sure there are some out there.
> 
> I've used Xemacs. Do you know if there is a PHP mode for it?
> 
> Otherwise you could check out Screem (www.screem.org) or Quanta
> (quanta.sourceforge.com).
> 
> V
> 
> 

yes, there is a number of PHP modes for Xemacs... Go here 
(http://www-public.tu-bs.de:8080/
~y0008422/krabutzig/emacsphp.html) for a good listing. 

--
Jeff Stuart
[EMAIL PROTECTED]


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




[PHP] I would like to get a script to display in a frame

2002-04-20 Thread Jeffrey D. Means

Does anyone have any experience with making script output display in a
frame??  I would like to get this to happen on an e-commerce site I am
designing and am stuck.  I have tried  with no success.  Please help.
 

Jeff Means
CIO for PicoTech
http://www.picotech.net
 



[PHP] Is there any way to change the process user (logon user) for a running script??

2002-05-09 Thread Jeffrey D. Means

I have come across a situation where I need to temporarly change the user
profile in the middle of a script.  I would prefer to do this than to change
ownership of files to allow the script to be able to read them.  I don't
know whose files I will be reading when the script runs, however I need to
be able to read files from /home/*/Mail on a user by user basis.  Is this
possible??

Jeff Means
CIO for PicoTech.NET


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




Re: [PHP] Apache alias to a specific .htm file

2001-08-17 Thread Jeffrey A Schoolcraft

if you have DirectoryIndex support you can specify what file it will use
as an index page.

for most unix type os's this seems to be index.php[ 3] index.htm[ l]
for IIS it's default.asp or something

Jeff

> In an ideal world I would like to be able to type http://localhost into
> my browser and for Apache server to throw up a specific .htm file on my

> to get to this .htm file. How can I setup Apache to automatically 'pick
> up' a set .htm file (ie, http://localhost equals "P:/My
> Projects/Storyboard/ife/index.htm").

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




[PHP] incorrect Timezone using mail() -- HELP!

2001-08-26 Thread Jeffrey Iskandar Ahmad

Hi,
Im writing this for second time.. has somebody experience this and please
help me.. pleaseee

When i use this function mail(), mail was sent successfully but when
recipient receive the mail the date timezone is incorrect. It
displayed  -0800 instead of +0800. Im from +0800. The timezone does not
display correctly. I have tried different servers but still the same.
And all clients get the wrong date. Im Using php 4.06 and win2k and
winnt4.

Can anybody help me.

Thanks

Jeffrey Iskandar Ahmad
System Engineer
Technology Division
TIME dotNet


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




[PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle

2001-09-21 Thread Jeffrey Iskandar Ahmad

I cannot connect to remote oracle database. I get the error below.

OCISessionBegin: Error while trying to retrieve text for error ORA-03106
(meening : fatal two-task communication protocol error)

My env is all correct.

My test.php:
$db = " (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = patin)(PORT =
1521))
)
(CONNECT_DATA =
(SID = I32)
)
)";

$c1 = ocilogon("ims","ims",$db);

if ($c1 == false){
echo OCIError($c1)."";
exit;
}
else
{
echo "success";
}


Jeffrey Iskandar Ahmad
System Engineer
Technology Division
TIME dotNet


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




RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle

2001-09-21 Thread Jeffrey Iskandar Ahmad


I did but didnt work.

Jeffrey Iskandar Ahmad
System Engineer
Technology Division
TIME dotNet


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 9:09 PM
To: Jeffrey Iskandar Ahmad; [EMAIL PROTECTED]
Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle
onLinux - remote oracle


Jeffrey,

Set your ORACLE_HOME environment variable.
putenv("ORACLE_HOME=/path/to/oracle/home/dir");

etc.

HTH

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers 

> -Original Message-
> From: Jeffrey Iskandar Ahmad [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 5:47 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux
> - remote oracle
> 
> 
> I cannot connect to remote oracle database. I get the error below.
> 
> OCISessionBegin: Error while trying to retrieve text for error ORA-03106
> (meening : fatal two-task communication protocol error)
> 
> My env is all correct.
> 
> My test.php:
> $db = " (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = patin)(PORT =
> 1521))
> )
> (CONNECT_DATA =
> (SID = I32)
> )
> )";
> 
> $c1 = ocilogon("ims","ims",$db);
> 
> if ($c1 == false){
> echo OCIError($c1)."";
> exit;
> }
> else
> {
> echo "success";
> }
> 
> 
> Jeffrey Iskandar Ahmad
> System Engineer
> Technology Division
> TIME dotNet
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

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


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




RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle

2001-09-23 Thread Jeffrey Iskandar Ahmad

I have reinstalled but still cannot work.

How i compile:
./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs \
--with-ldap=/home/jeffrey/download/directory/install --with-oci8=/home/oracl
e

Apache server stop and started.
Im using redhat 7. Oracle 8i installed as programmer, apache_1.3.14. Remote
oracle server version is 8.0.5

My bash env as below:
ORACLE_HOME=/home/oracle
TNS_ADMIN=$ORACLE_HOME/network/admin
PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib
ORA_NLS33=/home/oracle/ocommon/nls/admin/data

my php content:
putenv('TNS_ADMIN=/home/oracle/network/admin');
putenv("ORACLE_HOME=/home/oracle");
$db = " (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = patin)(PORT =
1521))
)
(CONNECT_DATA =
(SID = I32)
)
)";
$c1 = ocilogon("ims","ims",$db);
if ($c1 == false){
echo OCIError($c1)."";
}
else
{
echo "success";
}

I still get the same error
OCISessionBegin: Error while trying to retrieve text for error ORA-03106
meening : fatal two-task communication protocol error)

I have tested using sqlplus(same php server) connect to remote server, there
is no problem.

Do you have sample configuration how to do it.. please.. :)

Jeffrey Iskandar Ahmad
System Engineer
Technology Division
TIME dotNet


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 11:31 PM
To: Jeffrey Iskandar Ahmad; [EMAIL PROTECTED]
Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle
onLinux - remote oracle


Ensure that this is sent in the envrionment before compiling php and
starting apache as well.

Cheers,
Andrew

> -Original Message-
> From: Jeffrey Iskandar Ahmad [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 11:50 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle
> onLinux - remote oracle
>
>
>
> I did but didnt work.
>
> Jeffrey Iskandar Ahmad
> System Engineer
> Technology Division
> TIME dotNet
>
>
> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 9:09 PM
> To: Jeffrey Iskandar Ahmad; [EMAIL PROTECTED]
> Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle
> onLinux - remote oracle
>
>
> Jeffrey,
>
> Set your ORACLE_HOME environment variable.
> putenv("ORACLE_HOME=/path/to/oracle/home/dir");
>
> etc.
>
> HTH
>
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software  http://www.openlinksw.com
> Universal Data Access & Data Integration Technology Providers
>
> > -Original Message-
> > From: Jeffrey Iskandar Ahmad [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 21, 2001 5:47 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux
> > - remote oracle
> >
> >
> > I cannot connect to remote oracle database. I get the error below.
> >
> > OCISessionBegin: Error while trying to retrieve text for error ORA-03106
> > (meening : fatal two-task communication protocol error)
> >
> > My env is all correct.
> >
> > My test.php:
> > $db = " (DESCRIPTION =
> > (ADDRESS_LIST =
> > (ADDRESS = (PROTOCOL = TCP)(HOST = patin)(PORT =
> > 1521))
> > )
> > (CONNECT_DATA =
> > (SID = I32)
> > )
> > )";
> >
> > $c1 = ocilogon("ims","ims",$db);
> >
> > if ($c1 == false){
> > echo OCIError($c1)."";
> > exit;
> > }
> > else
> > {
> > echo "success";
> > }
> >
> >
> > Jeffrey Iskandar Ahmad
> > System Engineer
> > Technology Division
> > TIME dotNet
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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


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




RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle

2001-09-25 Thread Jeffrey Iskandar Ahmad

Andrew Hill,
I would like to thank you very much for your help. I manage to connect to
remote oracle after a week try. The problem was I run apache as nobody and
nobody user does not have priviliege to access ~oracle directory. Now I can
continue with my project.. :)

Jeffrey Iskandar Ahmad
System Engineer
Technology Division
TIME dotNet


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 24, 2001 9:38 PM
To: Jeffrey Iskandar Ahmad; [EMAIL PROTECTED]
Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle
onLinux - remote oracle


Jeffrey,

Ensure your ORACLE_SID is also set.
This is a case of Oracle environment variables.
Log in as the oracle user and look at the output of an 'env'.
You are missing something there.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers

> -Original Message-
> From: Jeffrey Iskandar Ahmad [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 24, 2001 1:04 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle
> onLinux - remote oracle
>
>
> I have reinstalled but still cannot work.
>
> How i compile:
> ./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs \
> --with-ldap=/home/jeffrey/download/directory/install
> --with-oci8=/home/oracl
> e
>
> Apache server stop and started.
> Im using redhat 7. Oracle 8i installed as programmer,
> apache_1.3.14. Remote
> oracle server version is 8.0.5
>
> My bash env as below:
> ORACLE_HOME=/home/oracle
> TNS_ADMIN=$ORACLE_HOME/network/admin
> PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/bin
> LD_LIBRARY_PATH=$ORACLE_HOME/lib
> ORA_NLS33=/home/oracle/ocommon/nls/admin/data
>
> my php content:
> putenv('TNS_ADMIN=/home/oracle/network/admin');
> putenv("ORACLE_HOME=/home/oracle");
> $db = " (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = patin)(PORT =
> 1521))
> )
> (CONNECT_DATA =
> (SID = I32)
> )
> )";
> $c1 = ocilogon("ims","ims",$db);
> if ($c1 == false){
> echo OCIError($c1)."";
> }
> else
> {
> echo "success";
> }
>
> I still get the same error
> OCISessionBegin: Error while trying to retrieve text for error ORA-03106
> meening : fatal two-task communication protocol error)
>
> I have tested using sqlplus(same php server) connect to remote
> server, there
> is no problem.
>
> Do you have sample configuration how to do it.. please.. :)
>
> Jeffrey Iskandar Ahmad
> System Engineer
> Technology Division
> TIME dotNet
>
>
> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 11:31 PM
> To: Jeffrey Iskandar Ahmad; [EMAIL PROTECTED]
> Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle
> onLinux - remote oracle
>
>
> Ensure that this is sent in the envrionment before compiling php and
> starting apache as well.
>
> Cheers,
> Andrew
>
> > -Original Message-
> > From: Jeffrey Iskandar Ahmad [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 21, 2001 11:50 AM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle
> > onLinux - remote oracle
> >
> >
> >
> > I did but didnt work.
> >
> > Jeffrey Iskandar Ahmad
> > System Engineer
> > Technology Division
> > TIME dotNet
> >
> >
> > -Original Message-
> > From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 21, 2001 9:09 PM
> > To: Jeffrey Iskandar Ahmad; [EMAIL PROTECTED]
> > Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle
> > onLinux - remote oracle
> >
> >
> > Jeffrey,
> >
> > Set your ORACLE_HOME environment variable.
> > putenv("ORACLE_HOME=/path/to/oracle/home/dir");
> >
> > etc.
> >
> > HTH
> >
> > Best regards,
> > Andrew Hill
> > Director of Technology Evangelism
> > OpenLink Software  http://www.openlinksw.com
> > Universal Data Access & Data Integration Technology Providers
> >
> > > -Original Message-
> > > From: Jeffrey Iskandar Ahmad [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, September 21, 2001 5:47 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] installing PHP wit

  1   2   >