Re: [PHP] Resizing a jpeg stored in a database

2003-09-19 Thread Jason Wong
On Friday 19 September 2003 04:51, Donald Tyler wrote:

[snip]

 Now I need to combine the two processes. I am storing jpegs in a
 database, and I want to write a script that can serve the image as
 either a thumbnail view or a full view. How exactly would I go about
 this? I was hoping I could just load the image from the database and
 then insert it into an object I created with imagecreate(). However I
 don't seem to be able to find any functions that will allow me to do
 that.

imagecreatefromstring()

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Space is to place as eternity is to time.
-- Joseph Joubert
*/

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



Re: [PHP] Warning during File uploading

2003-09-19 Thread Jason Wong
On Friday 19 September 2003 12:47, Binay wrote:

 I am uploading html,text etc files though HTTP upload form method. In my
 php.ini file value of upload_max_filesize is 2 MB. Now if the file size
 exceeds 2 MB i get warning messages saying size of the file exceeds
 upload_max_filesize value . I want to know how i can suppress this warning
 message and is there any method to get the file size before uploading so as
 to alert the clients accordingly?

You asked the same question yesterday?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
At times discretion should be thrown aside,
and with the foolish we should play the fool.
-- Menander
*/

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



Re: [PHP] Session with various Browser.

2003-09-19 Thread Eugene Lee
On Fri, Sep 19, 2003 at 02:39:21PM +1000, Justin French wrote:
: 
: Re-enforcing this is the fact that (AFAIK) no Mac browsers display 
: in-line PDFs via a plug-in -- they open 'Acrobat' or 'Preview' to 
: display them -- in other words, the PDF file should not be considered 
: part of the web application, therefor does not require session headers.

For Mac OS X folks, there is a browser plugin to view PDFs.

http://www.schubert-it.com/pluginpdf/

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



[PHP] SOLVED RE: [PHP] SESSION variables losing data on WinXP?

2003-09-19 Thread Jami
In case anyone else runs into this problem, the way I solved it was by
reinstalling php with the windows installer from php.net. I'm not
exactly sure what the problem was, but reinstalling it this way solved
the problem. Hope this helps someone else.

Jami Moore
LightSpark Digital Designs
[EMAIL PROTECTED]
http://www.lightsparkdigital.com/


-Original Message-
From: Jami [mailto:[EMAIL PROTECTED] 


I'm working on a project, and up until recently was using my hosting
account to do projects, but decided to update PHP on my comp to be able
to work on projects locally. I'm running WindowsXP, PHP 4.3.2, Apache
1.3, and MySQL 3.23.53. The validation page is called on each page, but
if I go to a page other than the entry page (which the validation page
takes you to when you first log in), it throws me back to the login
page. Has anyone run into this and have you solved it? Anyone have a
suggestion?

 

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



[PHP] include not returning true under zend debugger - possible bug?

2003-09-19 Thread Tom H
Hi,

if I have a statement like this;

 $success = @include somefile.inc;

under normally runnning in win2000 php 4.3.3 $success is true if the file
somefile.inc exists, but when run under the server debugger, $success is
false, unless somefile.inc has a return statement such as;

return 1;

in it. is this a problem with different versions of php or something?

Cheers

T.

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



[PHP] PHPInfo reports wrong version

2003-09-19 Thread Trininox
I'm running Apache 2 on Win32 and after installing 4.3.3 I notice the
X-Powered-By HTTP header is still PHP 4.3.2 so its reporting the wrong
version in the header

you can see
http://gto.dynu.com/phpinfo.php
PHP 4.3.2
looking further down everything says 4.3.3 except the title and the
X-Powered header information...

So how do I fix it?

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



[PHP] Shared Objects

2003-09-19 Thread Adam Whitehead
Hi All

I currently have a requirement to incorporate credit card processing in
my
application and my bank has provided me with a Linux shared object (.so
file)
that they said would suit my requirements. They indicated that PHP can
instantiate these shared objects and execute the functions contained
within.

However, PHP will not load the shared object, saying that it is not a
PHP
shared object.

Is there a way to take Linux shared objects and access the functionality
in them in PHP? Much like you would instantiate a COM object on Windows
to
call its methods?

Thanks
Adam

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



Re: [PHP] Shared Objects

2003-09-19 Thread Marek Kilimajer
You need to write a php extension to wrap around the object's functions.

Adam Whitehead wrote:
Hi All

I currently have a requirement to incorporate credit card processing in
my
application and my bank has provided me with a Linux shared object (.so
file)
that they said would suit my requirements. They indicated that PHP can
instantiate these shared objects and execute the functions contained
within.
However, PHP will not load the shared object, saying that it is not a
PHP
shared object.
Is there a way to take Linux shared objects and access the functionality
in them in PHP? Much like you would instantiate a COM object on Windows
to
call its methods?
Thanks
Adam
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] breaking a string into chunks

2003-09-19 Thread David T-G
Hi, all --

Now it's my turn to ask a simple question, or one that sure sounds like
it should be...

I have a 14-char date string like 20030917181909 and I need to break it
into its component parts for a more readable 2003-09-17 18:19:09 view.
How can I do that?  Do I really need to call substr half a dozen times?(!?)

I tried unpack() but all I ended up getting was an array with one entry
(sometimes with a very strange-looking key).


TIA  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] Bypassing the 'open or save' dialog when outputting a docum ent

2003-09-19 Thread FLOWERS, Gareth
Hi,
 
I'v created several pages for my company website that output php to MS Word
and MS Excel. These work fine fine but as soon as you load the page you get
a dialog that asks whether to open or save the document. We always select
'open' as we want view the contents in Excel/Word applications.
Is there a way to stop this dialog box appearing everytime - can I just open
the document without it appearing. I know theres a checkbox at the bottom of
the dialog you can unitck but I only want this setting to apply to certain
pages.
 
Thanks in advance,
Gareth



CONFIDENTIALITY NOTICE 
The information contained in this e-mail is intended only for the
confidential use of the above named recipient. If you are not the intended
recipient or person responsible for delivering it to the intended recipient,
you have received this communication in error and must not distribute or
copy it.  Please accept the sender's apologies, notify the sender
immediately by return e-mail and delete this communication.  Thank you. 

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



[PHP] Re: breaking a string into chunks

2003-09-19 Thread David Robley
In article [EMAIL PROTECTED], davidtg-
[EMAIL PROTECTED] says...
 Hi, all --
 
 Now it's my turn to ask a simple question, or one that sure sounds like
 it should be...
 
 I have a 14-char date string like 20030917181909 and I need to break it
 into its component parts for a more readable 2003-09-17 18:19:09 view.
 How can I do that?  Do I really need to call substr half a dozen times?(!?)
 
 I tried unpack() but all I ended up getting was an array with one entry
 (sometimes with a very strange-looking key).
 
 
 TIA  HAND
 
 :-D

If you are getting that string from a database, and the database is mysql, 
you could let the db do the work. See DATEFORMAT() in mysql.

Cheers
-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



Re: [PHP] breaking a string into chunks

2003-09-19 Thread Duncan Hill
On Friday 19 Sep 2003 10:20, David T-G wrote:
 Hi, all --

 Now it's my turn to ask a simple question, or one that sure sounds like
 it should be...

 I have a 14-char date string like 20030917181909 and I need to break it
 into its component parts for a more readable 2003-09-17 18:19:09 view.
 How can I do that?  Do I really need to call substr half a dozen

In perl I'd do something like:
$time =~ m/(\d){4}(\d){2}(\d){2}(\d){2}(\d){2}(\d){2}/;
$ntime = $1-$2-$3 $4:$5:$6;

I think php can do that with preg_match, using an array to hold the matches.

As the other poster said, if this is mysql, let mysql do the work for you :)

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



Re: [PHP] breaking a string into chunks

2003-09-19 Thread Marek Kilimajer
you can call preg_match, and only once

David T-G wrote:

Hi, all --

Now it's my turn to ask a simple question, or one that sure sounds like
it should be...
I have a 14-char date string like 20030917181909 and I need to break it
into its component parts for a more readable 2003-09-17 18:19:09 view.
How can I do that?  Do I really need to call substr half a dozen times?(!?)
I tried unpack() but all I ended up getting was an array with one entry
(sometimes with a very strange-looking key).
TIA  HAND

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


Re: [PHP] breaking a string into chunks

2003-09-19 Thread David T-G
Duncan, et al --

...and then Duncan Hill said...
% 
% On Friday 19 Sep 2003 10:20, David T-G wrote:
% 
%  I have a 14-char date string like 20030917181909 and I need to break it
%  into its component parts for a more readable 2003-09-17 18:19:09 view.
%  How can I do that?  Do I really need to call substr half a dozen
% 
% In perl I'd do something like:
% $time =~ m/(\d){4}(\d){2}(\d){2}(\d){2}(\d){2}(\d){2}/;
% $ntime = $1-$2-$3 $4:$5:$6;

Hmmm...  That's not a bad idea.


% 
% I think php can do that with preg_match, using an array to hold the matches.

Yep.


% 
% As the other poster said, if this is mysql, let mysql do the work for you :)

Well, I would, but this has already been pulled out by another call for
its own use.  I'm being clever and reusing the data I have rather than
making an extra DB query.  Gee, see how much time it's saving me? ;-)

It also happens that I don't know how to have mysql format it for me as I
would like were I to make said second query -- but that's only temporary.


Thanks  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] PHP mail() fonction - Slow? Alternative?

2003-09-19 Thread Stéphane Paquay
Hi all,

I'm using the mail() fonction to send email and it takes 60 seconds to send
a simple email. Maybe it's due to the sendmail configuration, or maybe not,
I'm not really sure, 'cos I'm not a Linux expert.

Anyway, I cannot take so long to send a simple mail with PHP, so I need to
find a solution, another way to send a mail or the riht configuration for
sendmail.

I hope someone will be able to help me.

Thanks,

Stephane.

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



RE: [PHP] breaking a string into chunks

2003-09-19 Thread Javier Tacon

Make your own function, for example:

function transformDate($format,$str) {
  $d = Array();
  for($i=0;$istrlen($str);$i+=2) { $d[]=substr($str,$i,2); }
  return
date($format,mktime($d[4],$d[5],$d[6],$d[2],$d[3],$d[0]$d[1]));
}

print transformDate(Y-m-d H:i:s,20030917181909);

So, you can change to any format with the first arg. of the function.


Javier Tacon Iglesias.


-Mensaje original-
De: David T-G [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 19 de septiembre de 2003 11:20
Para: PHP General list
Asunto: [PHP] breaking a string into chunks
Importancia: Baja


Hi, all --

Now it's my turn to ask a simple question, or one that sure sounds like
it should be...

I have a 14-char date string like 20030917181909 and I need to break
it
into its component parts for a more readable 2003-09-17 18:19:09 view.
How can I do that?  Do I really need to call substr half a dozen
times?(!?)

I tried unpack() but all I ended up getting was an array with one entry
(sometimes with a very strange-looking key).


TIA  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral
courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and
Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl
Npg!

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



[PHP] Returns..

2003-09-19 Thread Chris Mach
I have a simple little script that displays news articles that are stored in
mySQL database.

However, when the script displays the data, it doesn't recognize the
returns/enters. So I have to put brbr when ever I want a new paragraph
to begin.

How can I get my script to recognize the returns? is there any functions for
this type of thing?

Thanks

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



Re: [PHP] Returns..

2003-09-19 Thread Marek Kilimajer
nl2br()

Chris Mach wrote:
I have a simple little script that displays news articles that are stored in
mySQL database.
However, when the script displays the data, it doesn't recognize the
returns/enters. So I have to put brbr when ever I want a new paragraph
to begin.
How can I get my script to recognize the returns? is there any functions for
this type of thing?
Thanks

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


Re: [PHP] Returns..

2003-09-19 Thread Petre Agenbag
nl2br()

On Fri, 2003-09-19 at 13:27, Chris Mach wrote:
 I have a simple little script that displays news articles that are stored in
 mySQL database.
 
 However, when the script displays the data, it doesn't recognize the
 returns/enters. So I have to put brbr when ever I want a new paragraph
 to begin.
 
 How can I get my script to recognize the returns? is there any functions for
 this type of thing?
 
 Thanks

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



[PHP] Installation

2003-09-19 Thread reywein
Hello, 
I’m trying to install PHP using the Windows Installer that I downloaded from 
your site, but the installation seems to hang up while copying the php.ini 
file to c:\windows. I double click on the install icon, a popup appears that 
indicates it is being installed, the time remaining indicates 0 minutes, but 
it doesn’t seem to finish copying. I have waited 20 minutes for it to finish 
but it keeps running. Then the ‘Select Nodes’ box pops up but it tells me the 
other function hasn’t finish, and gives me the option to ‘switch to’ but I 
get stuck there. How long does it take? Is there another issue? I am using 
Windows XP Professional, with IIS. 
Thanks.
Ray Wein

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



Re: [PHP] Session with various Browser.

2003-09-19 Thread Marek Kilimajer
Experiment with session_cache_limiter(), for example try to set it to
private_no_expire.

Harry Yau wrote:

 Hi all,
 I am new to php. At first, I wrote a php script to generate a pdf
 file from a tex file and load that pdf file to the browser by call a
 system call of latex -pdftex. After loading the pdf file. I wrote a
 function to remove all temp file created by latex. It work fine and it
 did all I expected. The php script work on IE 5, Netscape 4.79 and
 Mozilla 5.0.
 However, when I've tried to add a command session_start at the
 beginning of my script and even did set and get those session variables,
 different functionility of the php script MISSed upon different browse.
 On Netscape 4.79,  it does generate the pdf file and  remove those
 temp file, but loading the pdf file to the browser. The Netscape keeps
 complainning about the pdf file is damaged and could not be repaired.
 On IE5, the script does load the pdf file, but it does not remove
 those temp file.
 Nevertheless, on Mozilla, it works fine for me!!
 For not loading the pdf on netscape, I thought it is because the
 script does some output to the browser before I call
 header(content-type:application/pdf); Therefore, I put ob_start()
 before starting session and call ob_end_clean() before setting the
 header for pdf content. It does not correct the problem.
 I am wondering what exactly the session_start() does? How it can
 have different effect upon various browser? Of simply, please tell me
 how to correct those problems!~
 Thank You Very Much!~
 
 
 Best Regards,
 Harry Yau
 

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



RE: [PHP] when clients go bad

2003-09-19 Thread Jay Blanchard
[snip]
: As this is a very small market, for this one client I did not create a

: contract - there was however a very detailed proposal which did not
include 
: any source files.  Whether it'll stand or not, we also had a verbal 
: agreement that they did not want any source files as at the time that
we 
: began our relationship, I had informed them that the source files
would 
: cost extra - the client at that time agreed that they did not want any

: source code.
[/snip]

Ah, a he said / he said thing.  I have a feeling that you may be
creating some very bad blood in your small market if this client wants
to smear you. Send them a letter to the affect that you verbally agreed
that access to source code would cost extra and see where that lands
you. Per our agreement on this date, the source code is available to
you at the cost of foo Watch how quickly their memory clouds up.

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



Re: [PHP] Installation

2003-09-19 Thread Marek Kilimajer
Are you using administrator account?

[EMAIL PROTECTED] wrote:

Hello, 
Im trying to install PHP using the Windows Installer that I downloaded from 
your site, but the installation seems to hang up while copying the php.ini 
file to c:\windows. I double click on the install icon, a popup appears that 
indicates it is being installed, the time remaining indicates 0 minutes, but 
it doesnt seem to finish copying. I have waited 20 minutes for it to finish 
but it keeps running. Then the Select Nodes box pops up but it tells me the 
other function hasnt finish, and gives me the option to switch to but I 
get stuck there. How long does it take? Is there another issue? I am using 
Windows XP Professional, with IIS. 
Thanks.
Ray Wein

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


Re: [PHP] Returns..

2003-09-19 Thread Chris Mach
Why does it put a space in there?  br /

It's screwing up my other script which displays just the first 50 words of
the news article by exploding each word into an array. So / is showing up
after each break.

http://www.ticatfans.com/index.php


Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 nl2br()

 Chris Mach wrote:
  I have a simple little script that displays news articles that are
stored in
  mySQL database.
 
  However, when the script displays the data, it doesn't recognize the
  returns/enters. So I have to put brbr when ever I want a new
paragraph
  to begin.
 
  How can I get my script to recognize the returns? is there any functions
for
  this type of thing?
 
  Thanks
 

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



Re: [PHP] Returns..

2003-09-19 Thread Marek Kilimajer
The space is there so it does not break some old browsers which could 
thing it is BR/ tag (yes, it does not exists). Change your logic or do 
 preg_replace(array(\r\n,\n,\r), 'br', $string) instead - not 
tested

Chris Mach wrote:

Why does it put a space in there?  br /

It's screwing up my other script which displays just the first 50 words of
the news article by exploding each word into an array. So / is showing up
after each break.
http://www.ticatfans.com/index.php

Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
nl2br()

Chris Mach wrote:

I have a simple little script that displays news articles that are
stored in

mySQL database.

However, when the script displays the data, it doesn't recognize the
returns/enters. So I have to put brbr when ever I want a new
paragraph

to begin.

How can I get my script to recognize the returns? is there any functions
for

this type of thing?

Thanks



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


Re: [PHP] multilanguage site: performance question: included file with cases?

2003-09-19 Thread daniel hahler
on Wed, 17 Sep 2003 21:08:31 + Curt Zirzow wrote:

 I'm building up a site which should be german and english. So I have a
 site object which remembers this choice during the session and do a
include('lang_'.$site-lang.'.php');
 in my topmost.php.
CZ I would suggest using gettext it will make the application real
CZ flexible. I havn't used it but from what I've seen it really is
CZ simple to use. Plus it keeps your translations completely seperate
CZ from your program.

CZ http://php.net/manual/en/ref.gettext.php

Thanks for your suggestion. I looked around, but did not get it
working properly at first, because of strange behaviour of setlocale
and no documentation (just many different comments on php.net) what is
used to initialize gettext.

after some hours I'm down to this code:
   putenv('LANGUAGE='.$site-lang);
   bindtextdomain (tqV2, ./locale);
   textdomain (tqV2);

and it works.. :)

But the same performance question resists: should I put all strings in
one .po file or seperate them?

Regarding collecting of already entered strings: there exists a tool
called xgettext, which can parse the .php files and creates a .po file
with all strings, but I'm unable to find a port for win32.. :/


-- 
shinE!
http://www.thequod.de ICQ#152282665
PGP 8.0 key: http://thequod.de/danielhahler.asc
Apollo Four Forty - Alcatraz Within The Joint Remix vs. @440 rocks. 

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



RE: [PHP] Returns..

2003-09-19 Thread Jay Blanchard
[snip]
Why does it put a space in there?  br /

It's screwing up my other script which displays just the first 50 words
of
the news article by exploding each word into an array. So / is showing
up
after each break.

http://www.ticatfans.com/index.php
[/snip]

It is inserting the XHTML acceptable break which is backwards
compatible, but having a look at your source it is doing this

br /fontfont face=arial size=2/

Inserting a font tag (Bad, Bad Thing TM) in the space and displaying the
last part of the tag. As a matter of fact, there is a font tag for each
word on the page, it appears...

font face=arial size=2Coreslab /fontfont face=arial
size=2International /fontfont face=arial size=2Inc.,
/fontfont face=arial size=2a /fontfont face=arial
size=2Hamilton-based /fontfont face=arial size=2concrete
/fontfont face=arial size=2fabrication /fontfont face=arial
size=2company, /fontfont face=arial size=2returned
/fontfont face=arial size=2from /fontfont face=arial
size=2a /font

There is something very wrong. Dump the font tags and you should see an
improvement.

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



[PHP] Re: Array, object problem....

2003-09-19 Thread george
point [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]...
 Huhgood news :)))
 
 Just solved it :
 
 I'm on the role..
 
 Y!
 
 :)))
 

-
Your solution would be helpful.

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



[PHP] Header won't redirect

2003-09-19 Thread Jonathan Duncan
This is code that I have in my index that check whether or not SSL is being
used when accessing certain pages and if not then it redirects to the same
address but with SSL.

if ($pagename==login || $pagename==signup || $pagename==checkout) {
 if (!$HTTPS) {
   //header(Location:
https://.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'].?pagename=$pagename);
   exit;
}
  }

This used to work before I upgraded my PHP.  Now when I click on a link that
matches my SSL checker it just hangs:

http://www.routerbitworld.com/index.php?pagename=checkout

If I change the header to redirect to a location without any variable
directive like this

http://www.routerbitworld.com/index.php

...works fine.  Why can't I send a variable this way?

Thanks,
Jonathan Duncan

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



RE: [PHP] Header won't redirect

2003-09-19 Thread Jay Blanchard
[snip]
This used to work before I upgraded my PHP.

[/snip]

Let me guess, you upgraded without actually reading the README or update
notes. I am going to guess that register_globals = off in php.ini. You
can either fix the variables $_GET['pagename'] or turn RG back on.

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



[PHP] PHP vs CGI ???

2003-09-19 Thread Scott Fletcher
Hi!

I have a question.  Someone said that PHP is CGI, that kind of turned my
head because PHP is not like that.  But I can see one thing, PHP can be
compiled as either a 'Shell-Scripting-Language', 'Webserver Component' or
'Both'...   PHP would be a form of CGI if it is used as Shell Scripting
Language but if I compile Apache and have it create a PHP module then it is
not a form of CGI.

Can anyone point this out or clarify this?  It would be very much be
appreciated.

Thanks,
 Scott F.

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



RE: [PHP] PHP vs CGI ???

2003-09-19 Thread Donald Tyler
PHP can be installed as either a CGI or an Apache module. There is
documentation on this in the PHP readme files.

Pretty much everything I read said that its always better to use the
Apache Module version. (apparently its much more stable and secure)

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2003 8:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP vs CGI ???

Hi!

I have a question.  Someone said that PHP is CGI, that kind of
turned my
head because PHP is not like that.  But I can see one thing, PHP can be
compiled as either a 'Shell-Scripting-Language', 'Webserver Component'
or
'Both'...   PHP would be a form of CGI if it is used as Shell Scripting
Language but if I compile Apache and have it create a PHP module then it
is
not a form of CGI.

Can anyone point this out or clarify this?  It would be very much be
appreciated.

Thanks,
 Scott F.

-- 
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] Returns..

2003-09-19 Thread Curt Zirzow
* Thus wrote Jay Blanchard ([EMAIL PROTECTED]):
 [snip]
 
 http://www.ticatfans.com/index.php
 [/snip]
 
 
 br /fontfont face=arial size=2/
 
 Inserting a font tag (Bad, Bad Thing TM) in the space and displaying the
 last part of the tag. As a matter of fact, there is a font tag for each
 word on the page, it appears...

Blame that on those *evil* wysiwyg editors.

 
 font face=arial size=2Coreslab /fontfont face=arial
 size=2International /fontfont face=arial size=2Inc.,
 /fontfont face=arial size=2a /fontfont face=arial
 size=2Hamilton-based /fontfont face=arial size=2concrete
 /fontfont face=arial size=2fabrication /fontfont face=arial
 size=2company, /fontfont face=arial size=2returned
 /fontfont face=arial size=2from /fontfont face=arial
 size=2a /font
 
 There is something very wrong. Dump the font tags and you should see an
 improvement.

tidy fixes this nicely.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] PHP vs CGI ???

2003-09-19 Thread Scott Fletcher
Looked through all of those 11 README files and they don't say much about
it.

Donald Tyler [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 PHP can be installed as either a CGI or an Apache module. There is
 documentation on this in the PHP readme files.

 Pretty much everything I read said that its always better to use the
 Apache Module version. (apparently its much more stable and secure)

 -Original Message-
 From: Scott Fletcher [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 19, 2003 8:38 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP vs CGI ???

 Hi!

 I have a question.  Someone said that PHP is CGI, that kind of
 turned my
 head because PHP is not like that.  But I can see one thing, PHP can be
 compiled as either a 'Shell-Scripting-Language', 'Webserver Component'
 or
 'Both'...   PHP would be a form of CGI if it is used as Shell Scripting
 Language but if I compile Apache and have it create a PHP module then it
 is
 not a form of CGI.

 Can anyone point this out or clarify this?  It would be very much be
 appreciated.

 Thanks,
  Scott F.

 -- 
 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] PHP Apache (GLOBALS) question

2003-09-19 Thread Frank Tudor
I'm forwarding this from the php-windows group. (I sent it to
both with the hopes someone with information would see this).

 I have installed Mandrake Linux and it comes standard with
 Apache PHP and MySQL.  You can install all these rpms through
 the server selectionAnyway.
 
 In my test environment it is function city and of course
 register globals were on.
 
 Now I have Taked my PHP.INI-DIST  set the globals to on and
 copied it to my /etc directory.
 
 It worked like a charmbut guess what.  I can't create a
 connection string to my database.  Now I have to find a
 solution
 to get this website to work with globals on and mysql.
 
 I have tried adding an .htacess with the php globals override
 thing
 
 
 php_value register_globals 1
 
 Ok this didn't work.
 
 So I found the Mysql-PHP RPM on my mandrake cd (of course
 enabling my php.ini file) and it didn't work.
 
 I'm getting closer to a solution but I am stuck.  Why won't
 the
 htaccess file work?  I would like to use my php.ini file but
 it
 is not configured for mysql, how could I fix this?  Is there
 anything I can do for either of these two questions to get my
 globals on?
 
 I swear I will never use functions again if someone helps me.
 
 :)
 
 Frank

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] breaking a string into chunks

2003-09-19 Thread Curt Zirzow
* Thus wrote Duncan Hill ([EMAIL PROTECTED]):
 On Friday 19 Sep 2003 10:20, David T-G wrote:
  Hi, all --
 
  Now it's my turn to ask a simple question, or one that sure sounds like
  it should be...
 
  I have a 14-char date string like 20030917181909 and I need to break it
  into its component parts for a more readable 2003-09-17 18:19:09 view.
  How can I do that?  Do I really need to call substr half a dozen
 
 In perl I'd do something like:
 $time =~ m/(\d){4}(\d){2}(\d){2}(\d){2}(\d){2}(\d){2}/;
 $ntime = $1-$2-$3 $4:$5:$6;

preg_match('/(\d){4}(\d){2}(\d){2}(\d){2}(\d){2}(\d){2}/', $time, $m);

Then $m is an array where the indexes
$m[0] = the matched string
$m[1] = first ()
$m[2] = second ()
...


 
 I think php can do that with preg_match, using an array to hold the matches.
 
 As the other poster said, if this is mysql, let mysql do the work for you :)
 
I suggest this also.  Or use the mysql unixtimestamp function to
return a uts and format the output with php.


In general most of my timestamp fields, in my tables, I create as an
INT then just store the Unix timestamp in there.  Makes things
easier when trying to display things.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] Bypassing the 'open or save' dialog when outputting a docum ent

2003-09-19 Thread Curt Zirzow
* Thus wrote FLOWERS, Gareth ([EMAIL PROTECTED]):
 Hi,
  
 I'v created several pages for my company website that output php to MS Word
 and MS Excel. These work fine fine but as soon as you load the page you get
 a dialog that asks whether to open or save the document. We always select
 'open' as we want view the contents in Excel/Word applications.
 Is there a way to stop this dialog box appearing everytime - can I just open
 the document without it appearing. I know theres a checkbox at the bottom of
 the dialog you can unitck but I only want this setting to apply to certain
 pages.

Nope, unfortunately you don't have that power, and for good reasons.
It all depends on the client's file (mime/type) associations on
their local computer.

If this were the case malicious people could force visitors to
launch an .eml file (or something containing a virus) without their
consent.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] PHP mail() fonction - Slow? Alternative?

2003-09-19 Thread Curt Zirzow
* Thus wrote Stéphane Paquay ([EMAIL PROTECTED]):
 Hi all,
 
 I'm using the mail() fonction to send email and it takes 60 seconds to send
 a simple email. Maybe it's due to the sendmail configuration, or maybe not,
 I'm not really sure, 'cos I'm not a Linux expert.

The odds are pretty high that it is your sendmail configuration.
Internally all php does is pass the information directly to
sendmail. Unless you're bcc'ing 10 people it won't take that
long for php.

 
 Anyway, I cannot take so long to send a simple mail with PHP, so I need to
 find a solution, another way to send a mail or the riht configuration for
 sendmail.

sendmail can be a nightmare to configure, if you are concerned
about speed, I might suggest finding a different mta like qmail or
postfix. They are more secure and faster than the traditional
sendmail.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] PHP Apache (GLOBALS) question

2003-09-19 Thread Marek Kilimajer
check your mysql.default_socket setting in php.ini

Frank Tudor wrote:

I can run mysql from a command line.

What I create a connection string using my php.ini file I get

failure. mysql_connect() errors

My connection string code is very simple:

?php
//list_db.php
$link_id = mysql_connect(localhost, username, password);
$result = mysql_list_dbs($link_id);
$num_rows = mysql_num_rows($result);
while($db_data = mysql_fetch_row($result)) {
echo $db_data[0]. BR;
$result2 = mysql_list_tables($db_data[0]);
$num_rows2 = mysql_num_rows($result2);
while($table_data = mysql_fetch_row($result2)) echo -- .
$table_data[0]. BR;
echo == $num_rows2 table(s) in  . $db_data[0] . P;
}
?
 Using this as a test and all my other connection strings
residing on my include file or one the same page as my code
fails.


--- Jay Blanchard [EMAIL PROTECTED] wrote:

[snip]
I have installed Mandrake Linux and it comes standard with
Apache PHP and MySQL.  You can install all these rpms through
the server selectionAnyway.
In my test environment it is function city and of course
register globals were on.
Now I have Taked my PHP.INI-DIST  set the globals to on and
copied it to my /etc directory.
It worked like a charmbut guess what.  I can't create a
connection string to my database.  Now I have to find a
solution
to get this website to work with globals on and mysql.
I have tried adding an .htacess with the php globals override
thing
php_value register_globals 1

Ok this didn't work.

So I found the Mysql-PHP RPM on my mandrake cd (of course
enabling my php.ini file) and it didn't work.
I'm getting closer to a solution but I am stuck.  Why won't
the
htaccess file work?  I would like to use my php.ini file but
it
is not configured for mysql, how could I fix this?  Is there
anything I can do for either of these two questions to get my
globals on?
I swear I will never use functions again if someone helps me.
[/snip]
Actually this sounds like a bunch of mutually exclusive
things.
1. Can you run MySQL from the command line?
2. Register_globlas has nothing to do with the connection
string to
MySQL
3. Can you show us your connection string code?


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP vs CGI ???

2003-09-19 Thread Curt Zirzow
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]):
 Looked through all of those 11 README files and they don't say much about
 it.

Traditionally php had two modes:
  1. module
  2. cgi/commandline

the cgi/commandline could be used interchangably.

Now there are three modes:
  1. module
  2. cgi
  3. commandline (CLI)

some references:

http://php.net/manual/en/features.commandline.php
http://php.net/manual/en/install.commandline.php


 

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



[PHP] Brain cramp with arrays

2003-09-19 Thread Mike Morton
I am having a total brain cramp with this array problem (may have to do with
the pressure change from the hurricane - but whatever ;) )

$helpsystem[onlineusignuphelp_username]='The username that you choose must
be more than 5 characters and 20 or less characters in length.  The username
must contain only numbers and letters.';
$helpsystem[onlineusignuphelp_password]='The password that you choose must
be more than 5 characters and 26 or less characters in length.  The username
may contain only numbers,letters, and the following characters:br! @ # % ^
*';

I am building a help system of sorts.  I have the following 2 array members
above (set exactly as such).  When I call the page it displays like:

Print $helpsystem[$_GET[tip]]

I would like to display a next and previous link to help items where
possible, the problem that I am having is figureing out how to get the next
and previous indexes.  I can get the current key with the key() function,
and the text for the next and previous using next() and and prev() but
because the help is called by the key, I need the index to call the array
item in the url:
Help.php?tip=onlinusignuphelp_password

I cannot seem to find a way to get even the current index number (i.e. 0) so
that I can add and subtract one to that index number...  Can anyone help out
with a pointer on how to get the next and prev keys?

Thanks ;) 

--
Cheers

Mike Morton


*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*


Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple.
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 

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



[PHP] Re: pcntl_fork() under linux with phpcli

2003-09-19 Thread Jay Smith

Try calling pcntl_waitpid() to clear out zombies. 

You could also try recompiling with --enable-sigchild if you haven't
already.

J

Daniel Souza wrote:

 
 well... playing with fork() in a phpcli script, i got some troubles with
 childs... anybody knows how to dont get zombies/defuncts with SIGCHLD and
 SIGCLD ignoring ? dont worked for me =/
 
 i dont want to know how many childs are running, or if they terminated or
 not... i want only to make childs :D
 ignoring SIGCHLD in perl works finely... is there anything about the
 phped-layer to syscalls access ? duh..
 
 comments are welcome =)
 
 []'s
 Daniel Souza
 

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



Re: [PHP] Bypassing the 'open or save' dialog when outputting a docum ent

2003-09-19 Thread Christophe Chisogne
Curt Zirzow wrote:

a dialog that asks whether to open or save the document. 


Nope, unfortunately you don't have that power, and for good reasons.
I agree, a browser should NOT open document (dangerous macros?) without
asking. I remember Microsoft created a patch for IE (around version 5.5) 
to force this behaviour.

Christophe

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


Re: [PHP] PHP Apache (GLOBALS) question

2003-09-19 Thread John Nichel
Frank Tudor wrote:
snip
It worked like a charmbut guess what.  I can't create a
connection string to my database.  Now I have to find a
solution
to get this website to work with globals on and mysql.
Register globals has nothing to do with making a connection to MySQL. 
Post your code for the connection please.

I have tried adding an .htacess with the php globals override
thing
php_value register_globals 1

Ok this didn't work.

So I found the Mysql-PHP RPM on my mandrake cd (of course
enabling my php.ini file) and it didn't work.
I'm getting closer to a solution but I am stuck.  Why won't
the
htaccess file work?  I would like to use my php.ini file but
What isn't working for .htaccess?  Is Apache configured to allow 
.htaccess files the ability to override php variables?

it
is not configured for mysql, how could I fix this?  Is there
anything I can do for either of these two questions to get my
globals on?
Not that you should turn globals on, but if this is really what you want 
to do, enable it in your php.ini file, and restart your webserver.

I swear I will never use functions again if someone helps me.

:)

Frank
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Apache (GLOBALS) question

2003-09-19 Thread John Nichel
Frank Tudor wrote:
I can run mysql from a command line.

What I create a connection string using my php.ini file I get

failure. mysql_connect() errors

My connection string code is very simple:

?php
//list_db.php
$link_id = mysql_connect(localhost, username, password);
$result = mysql_list_dbs($link_id);
$num_rows = mysql_num_rows($result);
while($db_data = mysql_fetch_row($result)) {
echo $db_data[0]. BR;
$result2 = mysql_list_tables($db_data[0]);
$num_rows2 = mysql_num_rows($result2);
while($table_data = mysql_fetch_row($result2)) echo -- .
$table_data[0]. BR;
echo == $num_rows2 table(s) in  . $db_data[0] . P;
}
?
 Using this as a test and all my other connection strings
residing on my include file or one the same page as my code
fails.


--- Jay Blanchard [EMAIL PROTECTED] wrote:

[snip]
I have installed Mandrake Linux and it comes standard with
Apache PHP and MySQL.  You can install all these rpms through
the server selectionAnyway.
In my test environment it is function city and of course
register globals were on.
Now I have Taked my PHP.INI-DIST  set the globals to on and
copied it to my /etc directory.
It worked like a charmbut guess what.  I can't create a
connection string to my database.  Now I have to find a
solution
to get this website to work with globals on and mysql.
I have tried adding an .htacess with the php globals override
thing
php_value register_globals 1

Ok this didn't work.

So I found the Mysql-PHP RPM on my mandrake cd (of course
enabling my php.ini file) and it didn't work.
I'm getting closer to a solution but I am stuck.  Why won't
the
htaccess file work?  I would like to use my php.ini file but
it
is not configured for mysql, how could I fix this?  Is there
anything I can do for either of these two questions to get my
globals on?
I swear I will never use functions again if someone helps me.
[/snip]
Actually this sounds like a bunch of mutually exclusive
things.
1. Can you run MySQL from the command line?
2. Register_globlas has nothing to do with the connection
string to
MySQL
3. Can you show us your connection string code?
Echo out mysql_error() after your connection attempt.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP vs CGI ???

2003-09-19 Thread Robert Cummings
PHP comes in three major compilations: module, CGI, and CLI. The module
only works for web server (that I know of) and is the fastest way to
serve PHP based content from a web server. CGI can be run for either the
shell, or from the web server. There is a performance hit when run from
the web server since the binary must be loaded on every request;
however, many hosting companies offer the CGI solution because it gives
the developer complete control over PHP version, extensions, and
anything else related to the binary itself. CGI as I said can also be
used for shell scripts. It was originally the only way to use PHP for
shell scripting until the recent addition of the CLI compilation which
provides features and enhancements specifically targeted at shell
scripting in PHP.

HTH,
Rob.

On Fri, 2003-09-19 at 10:16, Scott Fletcher wrote:
 Looked through all of those 11 README files and they don't say much about
 it.
 

-- 
..
| InterJinn Application Framework -- http://www.interjin.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] Re: Header won't redirect

2003-09-19 Thread PHP
Jay, good guess, but wrong!  While register_globals does equal off, I am
using $_GET['pagename']  to assign the value to $pagename before the snippet
of code that I sent.  Sorry I didn't mention that earlier.  I tried putting
the _GET in my header redirection directly, but that didn't help.  Any other
ideas?  Anyone else have an idea?

Thanks,
Jonathan Duncan


Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
This used to work before I upgraded my PHP.

[/snip]

Let me guess, you upgraded without actually reading the README or update
notes. I am going to guess that register_globals = off in php.ini. You
can either fix the variables $_GET['pagename'] or turn RG back on.

Jay Blanchard


Jonathan Duncan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 This is code that I have in my index that check whether or not SSL is
being
 used when accessing certain pages and if not then it redirects to the same
 address but with SSL.

 if ($pagename==login || $pagename==signup || $pagename==checkout) {
  if (!$HTTPS) {
//header(Location:

https://.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'].?pagename=$pagename);
exit;
 }
   }

 This used to work before I upgraded my PHP.  Now when I click on a link
that
 matches my SSL checker it just hangs:

 http://www.routerbitworld.com/index.php?pagename=checkout

 If I change the header to redirect to a location without any variable
 directive like this

 http://www.routerbitworld.com/index.php

 ...works fine.  Why can't I send a variable this way?

 Thanks,
 Jonathan Duncan

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



Re: [PHP] PHP Apache (GLOBALS) question

2003-09-19 Thread John Nichel
Frank Tudor wrote:
I did set my php.ini file in the etc dir and it worked fine.

But there was no mysql listed when I did a phpinfo.php page.
You installed all of this from RPM's, right?  Did you install the 
php-mysql RPM?

# rpm -q php-mysql

So more specifically, when I ude my php.ini file i have globals
on but mysql_connect failures
When I don't use php.ini files I get globals set to off and
mysql access
in ref. to .htaccess when I put and .htaccess in a dir and make
and enable httpd.conf to use htaccess it errors in the
http_perl.conf and if I try to edit my vhost config file with
the 

php_value register_globals 1

or

php_flag register_globals on

it failes when i restart my web seerver in the httpd-perl.conf
file
Frank

--- John Nichel [EMAIL PROTECTED] wrote:

Frank Tudor wrote:
snip
It worked like a charmbut guess what.  I can't create a
connection string to my database.  Now I have to find a
solution
to get this website to work with globals on and mysql.
Register globals has nothing to do with making a connection to
MySQL. 
Post your code for the connection please.


I have tried adding an .htacess with the php globals
override

thing

php_value register_globals 1

Ok this didn't work.

So I found the Mysql-PHP RPM on my mandrake cd (of course
enabling my php.ini file) and it didn't work.
I'm getting closer to a solution but I am stuck.  Why won't
the
htaccess file work?  I would like to use my php.ini file but
What isn't working for .htaccess?  Is Apache configured to
allow 
.htaccess files the ability to override php variables?


it
is not configured for mysql, how could I fix this?  Is there
anything I can do for either of these two questions to get
my

globals on?
Not that you should turn globals on, but if this is really
what you want 
to do, enable it in your php.ini file, and restart your
webserver.


I swear I will never use functions again if someone helps
me.

:)

Frank
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Brain cramp with arrays

2003-09-19 Thread Tom Rogers
Hi,

Saturday, September 20, 2003, 12:49:52 AM, you wrote:
MM I am having a total brain cramp with this array problem (may have to do with
MM the pressure change from the hurricane - but whatever ;) )

MM $helpsystem[onlineusignuphelp_username]='The username that you choose must
MM be more than 5 characters and 20 or less characters in length.  The username
MM must contain only numbers and letters.';
MM $helpsystem[onlineusignuphelp_password]='The password that you choose must
MM be more than 5 characters and 26 or less characters in length.  The username
MM may contain only numbers,letters, and the following characters:br! @ # % ^
MM *';

MM I am building a help system of sorts.  I have the following 2 array members
MM above (set exactly as such).  When I call the page it displays like:

MM Print $helpsystem[$_GET[tip]]

MM I would like to display a next and previous link to help items where
MM possible, the problem that I am having is figureing out how to get the next
MM and previous indexes.  I can get the current key with the key() function,
MM and the text for the next and previous using next() and and prev() but
MM because the help is called by the key, I need the index to call the array
MM item in the url:
MM Help.php?tip=onlinusignuphelp_password

MM I cannot seem to find a way to get even the current index number (i.e. 0) so
MM that I can add and subtract one to that index number...  Can anyone help out
MM with a pointer on how to get the next and prev keys?

MM Thanks ;) 

MM --
MM Cheers

MM Mike Morton

MM 
MM *
MM * Tel: 905-465-1263
MM * Email: [EMAIL PROTECTED]
MM *
MM 

MM Indeed, it would not be an exaggeration to describe the history of the
MM computer industry for the past decade as a massive effort to keep up with
MM Apple.
MM - Byte Magazine

MM Given infinite time, 100 monkeys could type out the complete works of
MM Shakespeare. Win 98 source code? Eight monkeys, five minutes.
MM -- NullGrey 


One way is to change your array layout like this

$helpsystem = array(
0 = array(
'title'='username',
'content'='The username that you choose must'),
1 = array(
'title' ='password',
'content'='The password that you choose must));

Then it is easy to navigate as the next and previous will always be numerical
keys

-- 
regards,
Tom

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



[PHP] Attention: List Administrator

2003-09-19 Thread Chris Sherwood
To Whom it may concern the following users

[EMAIL PROTECTED] 
[EMAIL PROTECTED] 

has been flooding me with viruses. fortunately I have the appropriate safeguards in 
place.

however this does not seem like appropriate activity for users and members of this 
list to attempt on anyone let alone the fellow members of this list as it displays a 
very low maturity level. I would appreciate any appropriate measures taken to stop 
this activity.

[PHP] Re: socket connect and response time

2003-09-19 Thread Christophe Chisogne
Simon Wistow [EMAIL PROTECTED] writes:

Is there an easy way to get the time taken to connect and the time taken 
to respond to an HTTP request or am I going to have to go in and hack 
around?
Be careful, there are problems with timeouts,
which dont work natively
(you can get 20sec timeout or more when requesting 3sec)
LWP::UserAgent uses IO::Socket::INET and

1. with LWP 5.69, Perl 5.8.0, Linux 2.4.18
the timeout handling code is put in comment
you can define your own signal handling
around the calls to LWP (sigaction prefered)
2. with LWP 5.43, Perl 5.005_03, Linux 2.2.16
the timeout handling code is not in comment
but doesnt work for me
(block in dns lookup, SIGINT I think)
But with Verisign rerouting all inexistant .com/.net domains,
the timeout will dramatically decrease for these :-(
Christophe

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


RE: [PHP] SNMP mib resoultion

2003-09-19 Thread Guy Fraser
Chris W. Parker Wrote :
 
  Guy Fraser mailto:[EMAIL PROTECTED]
  on Friday, September 12, 2003 1:53 PM said:
 
   This is my third attempt to send this message and I havn't seen one
   show up yet. :{
  
   I hope this gets through.
 
  I got it!!
Great...
Now if someone could answer my question.
Does any know how to get additional mibs to be resolved on FreeBSD or
Linux ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] config file

2003-09-19 Thread Payne
Hi,

I have a project that I need to write and in the past I would hard code 
a lot of information in pages that I should have put into a config file. 
I am wanting to know if there a website that example how to write a 
config file and how to the php call them.

Thanks

Chuck

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


Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Marek Kilimajer
And what about $_SERVER[HTTPS], are you using it?

PHP wrote:

Jay, good guess, but wrong!  While register_globals does equal off, I am
using $_GET['pagename']  to assign the value to $pagename before the snippet
of code that I sent.  Sorry I didn't mention that earlier.  I tried putting
the _GET in my header redirection directly, but that didn't help.  Any other
ideas?  Anyone else have an idea?
Thanks,
Jonathan Duncan
Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
This used to work before I upgraded my PHP.
[/snip]

Let me guess, you upgraded without actually reading the README or update
notes. I am going to guess that register_globals = off in php.ini. You
can either fix the variables $_GET['pagename'] or turn RG back on.
Jay Blanchard

Jonathan Duncan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
This is code that I have in my index that check whether or not SSL is
being

used when accessing certain pages and if not then it redirects to the same
address but with SSL.
if ($pagename==login || $pagename==signup || $pagename==checkout) {
if (!$HTTPS) {
  //header(Location:
https://.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'].?pagename=$pagename);

  exit;
   }
 }
This used to work before I upgraded my PHP.  Now when I click on a link
that

matches my SSL checker it just hangs:

http://www.routerbitworld.com/index.php?pagename=checkout

If I change the header to redirect to a location without any variable
directive like this
http://www.routerbitworld.com/index.php

...works fine.  Why can't I send a variable this way?

Thanks,
Jonathan Duncan


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


Re: [PHP] config file

2003-09-19 Thread R'twick Niceorgaw
Payne said the following on 9/19/2003 11:23 AM

Hi,

I have a project that I need to write and in the past I would hard code 
a lot of information in pages that I should have put into a config file. 
I am wanting to know if there a website that example how to write a 
config file and how to the php call them.

Thanks

Chuck

take a look at parse_ini() function

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


Re: [PHP] Brain cramp with arrays

2003-09-19 Thread Mike Morton
Hmm - ya - I could do that :)

But then again that would be 2 easy!  What I ended up doing is databasing
the help system and retaining a 'rank order' in there - so that I can always
quickly calculate the next and previous - dunno why I did not do that in the
first place - but there it is :)

Thanks for the suggest Tom!


On 9/19/03 11:13 AM, Tom Rogers [EMAIL PROTECTED] wrote:

 Hi,
 
 Saturday, September 20, 2003, 12:49:52 AM, you wrote:
 MM I am having a total brain cramp with this array problem (may have to do
 with
 MM the pressure change from the hurricane - but whatever ;) )
 
 MM $helpsystem[onlineusignuphelp_username]='The username that you choose must
 MM be more than 5 characters and 20 or less characters in length.  The
 username
 MM must contain only numbers and letters.';
 MM $helpsystem[onlineusignuphelp_password]='The password that you choose must
 MM be more than 5 characters and 26 or less characters in length.  The
 username
 MM may contain only numbers,letters, and the following characters:br! @ # %
 ^
 MM *';
 
 MM I am building a help system of sorts.  I have the following 2 array
 members
 MM above (set exactly as such).  When I call the page it displays like:
 
 MM Print $helpsystem[$_GET[tip]]
 
 MM I would like to display a next and previous link to help items where
 MM possible, the problem that I am having is figureing out how to get the
 next
 MM and previous indexes.  I can get the current key with the key() function,
 MM and the text for the next and previous using next() and and prev() but
 MM because the help is called by the key, I need the index to call the array
 MM item in the url:
 MM Help.php?tip=onlinusignuphelp_password
 
 MM I cannot seem to find a way to get even the current index number (i.e. 0)
 so
 MM that I can add and subtract one to that index number...  Can anyone help
 out
 MM with a pointer on how to get the next and prev keys?
 
 MM Thanks ;) 
 
 MM --
 MM Cheers
 
 MM Mike Morton
 
 MM 
 MM *
 MM * Tel: 905-465-1263
 MM * Email: [EMAIL PROTECTED]
 MM *
 MM 
 
 MM Indeed, it would not be an exaggeration to describe the history of the
 MM computer industry for the past decade as a massive effort to keep up with
 MM Apple.
 MM - Byte Magazine
 
 MM Given infinite time, 100 monkeys could type out the complete works of
 MM Shakespeare. Win 98 source code? Eight monkeys, five minutes.
 MM -- NullGrey 
 
 
 One way is to change your array layout like this
 
 $helpsystem = array(
   0 = array(
   'title'='username',
   'content'='The username that you choose must'),
   1 = array(
   'title' ='password',
   'content'='The password that you choose must));
 
 Then it is easy to navigate as the next and previous will always be numerical
 keys

--
Cheers

Mike Morton


*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*


Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple.
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 

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



RE: [PHP] config file

2003-09-19 Thread Jay Blanchard
[snip]
 I have a project that I need to write and in the past I would hard
code 
 a lot of information in pages that I should have put into a config
file. 
 I am wanting to know if there a website that example how to write a 
 config file and how to the php call them.

take a look at parse_ini() function
[/snip]


And http://www.php.net/include

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



RE: [PHP] Re: Header won't redirect

2003-09-19 Thread Jay Blanchard
[snip]
Jay, good guess, but wrong!  While register_globals does equal off, I am
using $_GET['pagename']  to assign the value to $pagename before the
snippet
of code that I sent.  Sorry I didn't mention that earlier.  I tried
putting
the _GET in my header redirection directly, but that didn't help.  Any
other
ideas?  Anyone else have an idea?
[/snip]

Can we see the line of code where you are making the assignment?

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



Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Robert Cummings
Here's an idea... echo each of the values and see what they actually
contain. While you grab $pagename from $_GET, where are you getting
$HTTPS? Is it a superglobal too? Maybe it's $_SERVER['HTTPS']

Cheers,
Rob.

On Fri, 2003-09-19 at 10:57, PHP wrote:
 Jay, good guess, but wrong!  While register_globals does equal off, I am
 using $_GET['pagename']  to assign the value to $pagename before the snippet
 of code that I sent.  Sorry I didn't mention that earlier.  I tried putting
 the _GET in my header redirection directly, but that didn't help.  Any other
 ideas?  Anyone else have an idea?
 
 Thanks,
 Jonathan Duncan
 
 
 Jay Blanchard [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 [snip]
 This used to work before I upgraded my PHP.
 
 [/snip]
 
 Let me guess, you upgraded without actually reading the README or update
 notes. I am going to guess that register_globals = off in php.ini. You
 can either fix the variables $_GET['pagename'] or turn RG back on.
 
 Jay Blanchard
 
 
 Jonathan Duncan [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  This is code that I have in my index that check whether or not SSL is
 being
  used when accessing certain pages and if not then it redirects to the same
  address but with SSL.
 
  if ($pagename==login || $pagename==signup || $pagename==checkout) {
   if (!$HTTPS) {
 //header(Location:
 
 https://.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'].?pagename=$pagename);
 exit;
  }
}
 
  This used to work before I upgraded my PHP.  Now when I click on a link
 that
  matches my SSL checker it just hangs:
 
  http://www.routerbitworld.com/index.php?pagename=checkout
 
  If I change the header to redirect to a location without any variable
  directive like this
 
  http://www.routerbitworld.com/index.php
 
  ...works fine.  Why can't I send a variable this way?
 
  Thanks,
  Jonathan Duncan
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Returns..

2003-09-19 Thread Raquel Rice
On Fri, 19 Sep 2003 07:53:12 -0400
Chris Mach [EMAIL PROTECTED] wrote:

 Why does it put a space in there?  br /
 
 It's screwing up my other script which displays just the first 50
 words of the news article by exploding each word into an array. So
 / is showing up after each break.
 

The reason for the space is to comply with XHTML standards.  The
XHTML declares that all tags must be properly nested, an end tag
closes, back to the matching start tag, all unclosed intervening
start tags with omitted end tags.

All empty elements must use the XML empty tag syntax with a
trailing forward slash (/) before the end bracket (eg. br
becomes br /). Note the space after the element text and the /.
This is for compatibility with current browsers.

--
Raquel

If God lived on earth, people would break his windows.
  --Jewish Proverb

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



Re: [PHP] Attention: List Administrator

2003-09-19 Thread Curt Zirzow
* Thus wrote Chris Sherwood ([EMAIL PROTECTED]):
 To Whom it may concern the following users
 
 [EMAIL PROTECTED] 
 [EMAIL PROTECTED] 
 
 has been flooding me with viruses. fortunately I have the appropriate safeguards in 
 place.
 

Yes, I was just about to contact the list admins about this.
Although I have gotten virus attatchments from other people as
well. 

And now I'm getting an autoresponder from someone's server saying
that I sent them a virus... egads... this is crazy :)


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



[PHP] Re: Brain cramp with arrays

2003-09-19 Thread Jonathan Duncan
Mike,

Have you looked at the Next:

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

and Previous:

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

... functions?

Regards,
Jonathan Duncan


Mike Morton [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am having a total brain cramp with this array problem (may have to do
with
 the pressure change from the hurricane - but whatever ;) )

 $helpsystem[onlineusignuphelp_username]='The username that you choose must
 be more than 5 characters and 20 or less characters in length.  The
username
 must contain only numbers and letters.';
 $helpsystem[onlineusignuphelp_password]='The password that you choose must
 be more than 5 characters and 26 or less characters in length.  The
username
 may contain only numbers,letters, and the following characters:br! @ # %
^
 *';

 I am building a help system of sorts.  I have the following 2 array
members
 above (set exactly as such).  When I call the page it displays like:

 Print $helpsystem[$_GET[tip]]

 I would like to display a next and previous link to help items where
 possible, the problem that I am having is figureing out how to get the
next
 and previous indexes.  I can get the current key with the key() function,
 and the text for the next and previous using next() and and prev() but
 because the help is called by the key, I need the index to call the array
 item in the url:
 Help.php?tip=onlinusignuphelp_password

 I cannot seem to find a way to get even the current index number (i.e. 0)
so
 that I can add and subtract one to that index number...  Can anyone help
out
 with a pointer on how to get the next and prev keys?

 Thanks ;)

 --
 Cheers

 Mike Morton

 
 *
 * Tel: 905-465-1263
 * Email: [EMAIL PROTECTED]
 *
 

 Indeed, it would not be an exaggeration to describe the history of the
 computer industry for the past decade as a massive effort to keep up with
 Apple.
 - Byte Magazine

 Given infinite time, 100 monkeys could type out the complete works of
 Shakespeare. Win 98 source code? Eight monkeys, five minutes.
 -- NullGrey

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



RE: [PHP] Attention: List Administrator

2003-09-19 Thread Dan Joseph
I got a few of those returns also.  I also apparently launched an attack on
the computer web server.  Kinda hilarious if you ask me.  Good excuse to
install Norton also.

-Dan Joseph

 -Original Message-
 From: Curt Zirzow [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 19, 2003 11:39 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Attention: List Administrator


 * Thus wrote Chris Sherwood ([EMAIL PROTECTED]):
  To Whom it may concern the following users
 
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 
  has been flooding me with viruses. fortunately I have the
 appropriate safeguards in place.
 

 Yes, I was just about to contact the list admins about this.
 Although I have gotten virus attatchments from other people as
 well.

 And now I'm getting an autoresponder from someone's server saying
 that I sent them a virus... egads... this is crazy :)


 Curt
 --
 I used to think I was indecisive, but now I'm not so sure.

 --
 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] Attention: List Administrator

2003-09-19 Thread Marek Kilimajer
And I get this:

[snip]
Violation Information:
The subject violated the content filtering rule PHP as subject is a
malacious code - Not Allowed.  No attempt was made to repair.
[/snip]
How can PHP be a code so powerfull it is not even allowed in the 
subject? I thought PHP was a drug.

Chris Sherwood wrote:

To Whom it may concern the following users

[EMAIL PROTECTED] 
[EMAIL PROTECTED] 

has been flooding me with viruses. fortunately I have the appropriate safeguards in place.

however this does not seem like appropriate activity for users and members of this list to attempt on anyone let alone the fellow members of this list as it displays a very low maturity level. I would appreciate any appropriate measures taken to stop this activity.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Header won't redirect

2003-09-19 Thread Chris Shiflett
--- Jonathan Duncan [EMAIL PROTECTED] wrote:
 This is code that I have in my index that check whether or not SSL
 is being used when accessing certain pages and if not then it
 redirects to the same address but with SSL.
 
 if ($pagename==login || $pagename==signup || $pagename==checkout) {
  if (!$HTTPS) {
//header(Location:

https://.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'].?pagename=$pagename);
exit;
 }
   }
 
 This used to work before I upgraded my PHP.  Now when I click on a link
 that matches my SSL checker it just hangs:
 
 http://www.routerbitworld.com/index.php?pagename=checkout
 
 If I change the header to redirect to a location without any variable
 directive like this
 
 http://www.routerbitworld.com/index.php
 
 ...works fine.  Why can't I send a variable this way?

You need to step back and do some debugging. I assume you just made a mistake
in your email, but you mentioned this not working:

http://www.routerbitworld.com/index.php?pagename=checkout

Now, if this is what your Location header is assigned to, you will send the
browser on an endless journey to find the resource it wants:

1. if ($pagename==login || $pagename==signup || $pagename==checkout)

OK, yes it does (assuming register_globals is on). Let's go to the next step:

2. if (!$HTTPS)

Assuming this works as you expect, this conditional is still true, because you
used http in your URL. So, we continue:

3. Redirect to http://www.routerbitworld.com/index.php?pagename=checkout

Rinse. Repeat.

That would definitely be a problem.

Before I make any other guesses, try this (I always suggest this same thing):

For eac:

header('Location: http://example.org/');

Change this to:

echo 'Location: http://example.org';

Meaning, echo where you're trying to redirect rather than sending the header.
This way you can follow what's going on on the screen.

Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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



RE: [PHP] Attention: List Administrator

2003-09-19 Thread Jay Blanchard
[snip]
[snippage]
Violation Information:
The subject violated the content filtering rule PHP as subject is a
malacious code - Not Allowed.  No attempt was made to repair.
[/snippage]

How can PHP be a code so powerfull it is not even allowed in the 
subject? I thought PHP was a drug.
[/snip]

LOL Notice that these are all coming from opussoft.com who I have had no
luck contacting this morning. Something tells me that someone at
opussoft wants to be on the list but the [PHP] in the subject lines is
screwing it up for them.

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



Re: [PHP] Attention: List Administrator

2003-09-19 Thread Raquel Rice
On Fri, 19 Sep 2003 15:39:12 +
Curt Zirzow [EMAIL PROTECTED] wrote:

 * Thus wrote Chris Sherwood ([EMAIL PROTECTED]):
  To Whom it may concern the following users
  
  [EMAIL PROTECTED] 
  [EMAIL PROTECTED] 
  
  has been flooding me with viruses. fortunately I have the
  appropriate safeguards in place.
  
 
 Yes, I was just about to contact the list admins about this.
 Although I have gotten virus attatchments from other people as
 well. 
 
 And now I'm getting an autoresponder from someone's server saying
 that I sent them a virus... egads... this is crazy :)
 
 
 Curt
 

I got one of those too!  Someone's server is going crazy.  FIX IT!

==

Quoted:  From: [EMAIL PROTECTED]

Please contact your system administrator.


The scanned document was deleted.


Violation Information:
The subject violated the content filtering rule PHP as subject is a
malacious code - Not Allowed.  No attempt was made to repair.


--
Raquel

If God lived on earth, people would break his windows.
  --Jewish Proverb

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



[PHP] Web server file perms || More than I can chew.....

2003-09-19 Thread CF High
Hey all.

Got a problem with a site builder app I've spent three months developing.

On my local machine (win2k pro, apache), no problems -- everything works
just as designed.

Today I began testing on the live server; i.e. my client's hosting company
(linux, apache 1.3.27, php 4.3.1)  -- that's when the trouble started.

The site builder app builds static pages based on changes made by users in
our online administration center.  When I test out creating a new site
section; i.e. triggering my make_file function(writes page content to new
file) I receive the following error:


  Warning: fopen(/local_server_path/file_to_create.php) [function.fopen]:
failed to create stream: Permission denied

I've attempted to chmod(777) my testing directory via ftp client, which
appears to work; however, when I fileperms($file_in_test_dir), I get
chmod(644), so clearly I'm not the owner.

Pardon my ignorance here, but I as yet know little about dir/file perms.
Should I contact the host and have them give me sufficient permissions?

Any help so much appreciated as I am completely handcuffed at the moment.

Thanks,

--Noah

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



Re: [PHP] Attention: List Administrator

2003-09-19 Thread Payne
Raquel Rice wrote:

On Fri, 19 Sep 2003 15:39:12 +
Curt Zirzow [EMAIL PROTECTED] wrote:
 

* Thus wrote Chris Sherwood ([EMAIL PROTECTED]):
   

To Whom it may concern the following users

[EMAIL PROTECTED] 
[EMAIL PROTECTED] 

has been flooding me with viruses. fortunately I have the
appropriate safeguards in place.
 

Yes, I was just about to contact the list admins about this.
Although I have gotten virus attatchments from other people as
well. 

And now I'm getting an autoresponder from someone's server saying
that I sent them a virus... egads... this is crazy :)
Curt

   

I got one of those too!  Someone's server is going crazy.  FIX IT!

==

Quoted:  From: [EMAIL PROTECTED]

Please contact your system administrator.

The scanned document was deleted.

Violation Information:
The subject violated the content filtering rule PHP as subject is a
malacious code - Not Allowed.  No attempt was made to repair.
--
Raquel

If God lived on earth, people would break his windows.
 --Jewish Proverb
 

Me too, I just got one. I think someone at that server is a member of 
this and got one of those 8 eights e-mails that where suppose to be from 
micrsoft this morning.

Chuck

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


Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Scott Fletcher
Try $_REQUEST['pagename'] instead.  Oh before you do that, try this and see
if you have any received data at all in the first place.  just look for
'pagename' in any arrays, don't look for $_GET['pagename'], just look for
'pagename' and see if there is any.

--snip--
?
print_r($GLOBALS);
?
--snip--
Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
Jay, good guess, but wrong!  While register_globals does equal off, I am
using $_GET['pagename']  to assign the value to $pagename before the
snippet
of code that I sent.  Sorry I didn't mention that earlier.  I tried
putting
the _GET in my header redirection directly, but that didn't help.  Any
other
ideas?  Anyone else have an idea?
[/snip]

Can we see the line of code where you are making the assignment?

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



Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Jonathan Duncan
Marek and Rob,

Doh!  That was it.  I am still finding things that I used to assign
globally.  It is a good thing, but it makes for a bit of work.  Thanks to
Jay too.  I appreciate everyone's help.

Have a good one,
Jonathan Duncan



Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 And what about $_SERVER[HTTPS], are you using it?

 PHP wrote:

  Jay, good guess, but wrong!  While register_globals does equal off, I am
  using $_GET['pagename']  to assign the value to $pagename before the
snippet
  of code that I sent.  Sorry I didn't mention that earlier.  I tried
putting
  the _GET in my header redirection directly, but that didn't help.  Any
other
  ideas?  Anyone else have an idea?
 
  Thanks,
  Jonathan Duncan
 
 
  Jay Blanchard [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
  [snip]
  This used to work before I upgraded my PHP.
 
  [/snip]
 
  Let me guess, you upgraded without actually reading the README or update
  notes. I am going to guess that register_globals = off in php.ini. You
  can either fix the variables $_GET['pagename'] or turn RG back on.
 
  Jay Blanchard
 
 
  Jonathan Duncan [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 
 This is code that I have in my index that check whether or not SSL is
 
  being
 
 used when accessing certain pages and if not then it redirects to the
same
 address but with SSL.
 
 if ($pagename==login || $pagename==signup || $pagename==checkout)
{
  if (!$HTTPS) {
//header(Location:
 
 
 
https://.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'].?pagename=$pagename);
 
exit;
 }
   }
 
 This used to work before I upgraded my PHP.  Now when I click on a link
 
  that
 
 matches my SSL checker it just hangs:
 
 http://www.routerbitworld.com/index.php?pagename=checkout
 
 If I change the header to redirect to a location without any variable
 directive like this
 
 http://www.routerbitworld.com/index.php
 
 ...works fine.  Why can't I send a variable this way?
 
 Thanks,
 Jonathan Duncan
 
 

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



Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Jonathan Duncan
Jay,

Try replying to the group so that your contributions stay with the thread
instead of being orphaned and lost.

Regards,
Jonathan Duncan


Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
Jay, good guess, but wrong!  While register_globals does equal off, I am
using $_GET['pagename']  to assign the value to $pagename before the
snippet
of code that I sent.  Sorry I didn't mention that earlier.  I tried
putting
the _GET in my header redirection directly, but that didn't help.  Any
other
ideas?  Anyone else have an idea?
[/snip]

Can we see the line of code where you are making the assignment?

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



Re: [PHP] PHP Apache (GLOBALS) question

2003-09-19 Thread John Nichel
Frank Tudor wrote:
Yes to the php-mysql rpm,

But listen I think it was the way it built the initial appach
php mysql configurations  I don't think the php.ini refects an
accurate setup of my php mysql setup.
Frank
Let's get away from the php.ini for a moment.  Being that you did 
everything from RPM, the ini file doesn't come into play here (you 
basically have a default setup, with default settings).  The stock 
php.ini file will do just fine.

What is the output of this code on your box.

if ([EMAIL PROTECTED](your_host, your_username, your_password)){
echo ( mysql_error() );
} else {
echo ( Connection exists );
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: Header won't redirect

2003-09-19 Thread Jay Blanchard
[snip]
Try replying to the group so that your contributions stay with the
thread
instead of being orphaned and lost.
[/snip]

I always do, did something weird happen? 

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



Re: [PHP] Attention: List Administrator

2003-09-19 Thread David T-G
Dan, et al --

...and then Dan Joseph said...
% 
% the computer web server.  Kinda hilarious if you ask me.  Good excuse to
% install Norton also.

s/Norton/linux+qmail/

*grin*


:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] Attention: List Administrator

2003-09-19 Thread Ryan A
Hey all,

IMHO I think that sites selling you virus software (resellers for norton?)
are sending most of those crappy messages saying that they recieved a mail
from you that contained a virus and $insertVirusName has caught it.

chances are if you are scared enought or dont know enough you will probably
visit their link or see where the email came from and..

Just my $0.2 cents.

cheers,
-Ryan

We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com

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



[PHP] Opening new browser window

2003-09-19 Thread Rich Fox
I would like to open a new browser window from within my php script
(edit.php), a window in which another php page is run (search.php).
search.php should be able to receive $_POST vars etc. from edit.php. I am
not sure that the javascript solution to popup a window is correct, because
then the popup does not behave normally.

By normally, I mean that when I use javascript to popup a new window
(search.php), and in search.php I have a form

form action=searchAction.php method=post
 input type=hidden name=caller   value=window.opener.location.href
 input type=hidden name=ID   value=? $_GET['ID'] ? 
 input type=hidden name=Type   value=? $type? 
 input type=button name=btnOKvalue=OK
 input type=button name=btnCancel   value=Cancel
/form

clicking OK or Cancel does absolutely nothing. So, I would like to avoid
javascript and simply open a new browser window to run search.php. What is
the accepted way to do this in php?

tia,

Rich

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



RE: [PHP] Attention: List Administrator

2003-09-19 Thread Javier Tacon

Yes, I have been flooded today too .. 

The virus is: Worm . Automat . AHB



-Mensaje original-
De: Chris Sherwood [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 19 de septiembre de 2003 17:15
Para: [EMAIL PROTECTED]
Asunto: [PHP] Attention: List Administrator
Importancia: Baja


To Whom it may concern the following users

[EMAIL PROTECTED] 
[EMAIL PROTECTED] 

has been flooding me with viruses. fortunately I have the appropriate safeguards in 
place.

however this does not seem like appropriate activity for users and members of this 
list to attempt on anyone let alone the fellow members of this list as it displays a 
very low maturity level. I would appreciate any appropriate measures taken to stop 
this activity.

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



Re: [PHP] Attention: List Administrator

2003-09-19 Thread R'twick Niceorgaw
David T-G said the following on 9/19/2003 12:25 PM

Dan, et al --

...and then Dan Joseph said...
% 
% the computer web server.  Kinda hilarious if you ask me.  Good excuse to
% install Norton also.

s/Norton/linux+qmail/

*grin*

:-D
s/linux+qmail/linux+qmail+spamassassin+tmda+f-prot/ :)

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


RE: [PHP] Attention: List Administrator

2003-09-19 Thread Dan Joseph
Hi,

 s/Norton/linux+qmail/

haha..  that be a good solution for sure!

-Dan Joseph

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



Re: [PHP] Opening new browser window

2003-09-19 Thread Marek Kilimajer
form target=searchwindow 

Rich Fox wrote:

I would like to open a new browser window from within my php script
(edit.php), a window in which another php page is run (search.php).
search.php should be able to receive $_POST vars etc. from edit.php. I am
not sure that the javascript solution to popup a window is correct, because
then the popup does not behave normally.
By normally, I mean that when I use javascript to popup a new window
(search.php), and in search.php I have a form
form action=searchAction.php method=post
 input type=hidden name=caller   value=window.opener.location.href
 input type=hidden name=ID   value=? $_GET['ID'] ? 
 input type=hidden name=Type   value=? $type? 
 input type=button name=btnOKvalue=OK
 input type=button name=btnCancel   value=Cancel
/form
clicking OK or Cancel does absolutely nothing. So, I would like to avoid
javascript and simply open a new browser window to run search.php. What is
the accepted way to do this in php?
tia,

Rich

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


Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Jonathan Duncan
Perhaps it is just Outlook Express but many of your replies are showing as
ophans.

Jonathan


Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
Try replying to the group so that your contributions stay with the
thread
instead of being orphaned and lost.
[/snip]

I always do, did something weird happen?

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



Re: [PHP] Attention: List Administrator

2003-09-19 Thread Don Mc Nair
I got 21 emails with attachments today from Microsoft.

Don




Payne [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Raquel Rice wrote:

 On Fri, 19 Sep 2003 15:39:12 +
 Curt Zirzow [EMAIL PROTECTED] wrote:
 
 
 
 * Thus wrote Chris Sherwood ([EMAIL PROTECTED]):
 
 
 To Whom it may concern the following users
 
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
 has been flooding me with viruses. fortunately I have the
 appropriate safeguards in place.
 
 
 
 Yes, I was just about to contact the list admins about this.
 Although I have gotten virus attatchments from other people as
 well.
 
 And now I'm getting an autoresponder from someone's server saying
 that I sent them a virus... egads... this is crazy :)
 
 
 Curt
 
 
 
 
 I got one of those too!  Someone's server is going crazy.  FIX IT!
 
 ==
 
 Quoted:  From: [EMAIL PROTECTED]
 
 Please contact your system administrator.
 
 
 The scanned document was deleted.
 
 
 Violation Information:
 The subject violated the content filtering rule PHP as subject is a
 malacious code - Not Allowed.  No attempt was made to repair.
 
 
 --
 Raquel
 
 If God lived on earth, people would break his windows.
   --Jewish Proverb
 
 
 
 Me too, I just got one. I think someone at that server is a member of
 this and got one of those 8 eights e-mails that where suppose to be from
 micrsoft this morning.

 Chuck


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003

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



[PHP] Media Presentations

2003-09-19 Thread Vail, Warren
I wanted to create web based slideshow and audio media presentations and was 
disappointed by two PHP function sets.  I would love to hear of any others that might 
be available.
 
Tried MING, and discovered that there were at least 3 different versions (all numbered 
version 0.2a) that were incompatible with each other depending on where I installed my 
code.
  Example: 
 
   function swfbitmap 
   1). would in one case accept a string containing image.
   2). in a second case accepted a string containing a file name but not the bitmap
   3). and in a third case only accepted a file handle (returned from fopen) of 
the file containing the bit map and not just the filename.
 
I then tried the SWFlib functions available with PHP and discovered that it is no 
longer supported, and that source is unavailable. (one reason that a version for the 
windows platform is unavailable).  This also means that keeping up with the latest 
shockwave reader features is not possible (which bothers me more).
 
Are there any options I have overlooked?
 
thanks in advance,
 
Warren Vail


Re: [PHP] Web server file perms || More than I can chew.....

2003-09-19 Thread Lowell Allen
 On my local machine (win2k pro, apache), no problems -- everything works
 just as designed.
 
 Today I began testing on the live server; i.e. my client's hosting company
 (linux, apache 1.3.27, php 4.3.1)  -- that's when the trouble started.
 
 The site builder app builds static pages based on changes made by users in
 our online administration center.  When I test out creating a new site
 section; i.e. triggering my make_file function(writes page content to new
 file) I receive the following error:
 
 Warning: fopen(/local_server_path/file_to_create.php) [function.fopen]:
 failed to create stream: Permission denied
 
 I've attempted to chmod(777) my testing directory via ftp client, which
 appears to work; however, when I fileperms($file_in_test_dir), I get
 chmod(644), so clearly I'm not the owner.
 
 Pardon my ignorance here, but I as yet know little about dir/file perms.
 Should I contact the host and have them give me sufficient permissions?

If you create a subdirectory of the root level public HTML directory, then
PHP can create files there, but not in the root level directory. If you
change permissions to 777, PHP can create files there, but it's not a good
idea to have the permissions that wide-open.

You might be able to get your commercial host to change who PHP is running
as from nobody to your login identity, then PHP could write to the root
level directory, but you might not be able to -- my main host says they're
changing policy for security reasons to not allow that.

You could put the static files in a subdirectory where PHP will have
permission to create files. But this might require lots of reworking links
depending on your site design, and thus not be a viable option.

You could set up a PHP script to be executed by a crontab as a CGI. Done
this way, PHP can write to the root level directory. This is what I did
recently for a similar problem. The content management system provides a
link for updating static HTML pages. That link (script) writes info to the
database, flagging an update request. Every 5 minutes, a crontab calls the
PHP CGI script that actually does the update. The script checks the database
flag and does the updates if they've been requested (flagged).

Bottom line -- discuss the problem with your commercial host and see what
they suggest.

--
Lowell Allen

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



Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Scott Fletcher
Well, I'm using Outlook Express and it looked fine for an hour or so now.
But not with the ones earlier in the morning.  Strange though!

Scott F.

Jonathan Duncan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Perhaps it is just Outlook Express but many of your replies are showing as
 ophans.

 Jonathan


 Jay Blanchard [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 [snip]
 Try replying to the group so that your contributions stay with the
 thread
 instead of being orphaned and lost.
 [/snip]

 I always do, did something weird happen?

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



Re: [PHP] Web server file perms || More than I can chew.....

2003-09-19 Thread Marek Kilimajer
You can use ftp functions to create the files, so permissions won't be 
problem anymore.

CF High wrote:

Hey all.

Got a problem with a site builder app I've spent three months developing.

On my local machine (win2k pro, apache), no problems -- everything works
just as designed.
Today I began testing on the live server; i.e. my client's hosting company
(linux, apache 1.3.27, php 4.3.1)  -- that's when the trouble started.
The site builder app builds static pages based on changes made by users in
our online administration center.  When I test out creating a new site
section; i.e. triggering my make_file function(writes page content to new
file) I receive the following error:
  Warning: fopen(/local_server_path/file_to_create.php) [function.fopen]:
failed to create stream: Permission denied
I've attempted to chmod(777) my testing directory via ftp client, which
appears to work; however, when I fileperms($file_in_test_dir), I get
chmod(644), so clearly I'm not the owner.
Pardon my ignorance here, but I as yet know little about dir/file perms.
Should I contact the host and have them give me sufficient permissions?
Any help so much appreciated as I am completely handcuffed at the moment.

Thanks,

--Noah

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


Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Scott Fletcher
But Jay Blanchard situation wasn't the only one.  It's the same for other
people.

Scott Fletcher [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Well, I'm using Outlook Express and it looked fine for an hour or so now.
 But not with the ones earlier in the morning.  Strange though!

 Scott F.

 Jonathan Duncan [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Perhaps it is just Outlook Express but many of your replies are showing
as
  ophans.
 
  Jonathan
 
 
  Jay Blanchard [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
  [snip]
  Try replying to the group so that your contributions stay with the
  thread
  instead of being orphaned and lost.
  [/snip]
 
  I always do, did something weird happen?

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



Re: [PHP] config file

2003-09-19 Thread CPT John W. Holmes
From: Payne [EMAIL PROTECTED]
 I have a project that I need to write and in the past I would hard code
 a lot of information in pages that I should have put into a config file.
 I am wanting to know if there a website that example how to write a
 config file and how to the php call them.

You can use a php.ini-style config file and quickly and easily parse it with
parse_ini_file().

Only security issue to watch for is storing the file in your webroot and
someone being able to call it up and view it plain text. Config files should
not be in the web root. If you HAVE to store it there for some reason, deny
access to it through an .htaccess file, or give it a .php extension and put
a line it it like:

; ?php exit; ?

Notice the semi-colon at the end which will make this a commented out line
for parse_ini_file() purposes. However, when parsed by PHP directly (called
through a browser), PHP will hit the exit; call and terminate the execution
of the file and no other lines will be shown.

Someone else mentioned include(), which would mean you'd have a normal PHP
file that defines variables and just include it. This is useful if a PHP
coder is doing the maintaining, but if someone else is changing things, you
have to ensure they don't mess up the PHP code. Using a php.ini-style file
is easier for others as it's less strict on the syntax.

Hope this helps.

---John Holmes...

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



RE: [PHP] Attention: List Administrator

2003-09-19 Thread Jennifer Goodie
 And I get this:
 
 [snip]
 Violation Information:
 The subject violated the content filtering rule PHP as subject is a
 malacious code - Not Allowed.  No attempt was made to repair.
 [/snip]
 
 How can PHP be a code so powerfull it is not even allowed in the 
 subject? I thought PHP was a drug.
 

Apparently there is a virus written in PHP
http://securityresponse.symantec.com/avcenter/venc/data/php.virdrus.html

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



Re: [PHP] Opening new browser window

2003-09-19 Thread Rich Fox
And if you are not in a form? My current code is:

a href=search.php onClick=return popup(this,
'Industry','?ID=$companyIDType=Industry')
   img src=images/Plus.gif
 /a

where popup is my javascript function. But as I said below, the popup
doesn't work as expected and I do not want to use javascript. I can also not
be in a form. Suggestions?

Rich

Marek Kilimajer [EMAIL PROTECTED] wrote in message

 form target=searchwindow 


 Rich Fox wrote:

  I would like to open a new browser window from within my php script
  (edit.php), a window in which another php page is run (search.php).
  search.php should be able to receive $_POST vars etc. from edit.php. I
am
  not sure that the javascript solution to popup a window is correct,
because
  then the popup does not behave normally.
 
  By normally, I mean that when I use javascript to popup a new window
  (search.php), and in search.php I have a form
 
  form action=searchAction.php method=post
   input type=hidden name=caller   value=window.opener.location.href
   input type=hidden name=ID   value=? $_GET['ID'] ? 
   input type=hidden name=Type   value=? $type? 
   input type=button name=btnOKvalue=OK
   input type=button name=btnCancel   value=Cancel
  /form
 
  clicking OK or Cancel does absolutely nothing. So, I would like to avoid
  javascript and simply open a new browser window to run search.php. What
is
  the accepted way to do this in php?
 
  tia,
 
  Rich
 

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



[PHP] Session and Server variable problem

2003-09-19 Thread Stephen Schneider
Hi all,

Have an interesting problem.  Worked on a web site for a client.  They
have the server (IIS) set up and we are using php.  Have been working
with their domain with a .net extension.  To go live, they repointed
their .com domain to the web folder.  Same spot the .net points to.  But
now server and session variables aren't working.  They still work if we
use .net but not .com.  Can't set or read them.  Anyone run into this
before?

Thanks for any thoughts and assistance.

Stephen
 
__
Mind Architecture
[EMAIL PROTECTED]
www.mindarch.com
330-329-8748  phone
mindarchAOL IM

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



Re: [PHP] Opening new browser window

2003-09-19 Thread R'twick Niceorgaw
Rich Fox said the following on 9/19/2003 12:33 PM
I would like to open a new browser window from within my php script
(edit.php), a window in which another php page is run (search.php).
search.php should be able to receive $_POST vars etc. from edit.php. I am
not sure that the javascript solution to popup a window is correct, because
then the popup does not behave normally.
By normally, I mean that when I use javascript to popup a new window
(search.php), and in search.php I have a form
form action=searchAction.php method=post
 input type=hidden name=caller   value=window.opener.location.href
window is a javascript object and so you should be calling some 
javascript function to set the value here, something like

body  onload = setvalue()
script
document.form.caller.value=window.opener.location.href;
/script
 input type=hidden name=ID   value=? $_GET['ID'] ? 
 input type=hidden name=Type   value=? $type? 
 input type=button name=btnOKvalue=OK
 input type=button name=btnCancel   value=Cancel
/form
clicking OK or Cancel does absolutely nothing. So, I would like to avoid
javascript and simply open a new browser window to run search.php. What is
the accepted way to do this in php?
btnOK and btnCancel are not instructed to do anything when clicked and 
so there's nothing wrong they are doing! what work these two buttons are 
supposed to do?
I assume
1. btnOK is to post the data to server?
in that case, you should have it as button=submit or
an onClick=javascript function()?

2. btnCancel is to close the window and go back to the parent page?
in that case also, you should have a onClick function.
HTH
R'twick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Opening new browser window

2003-09-19 Thread Brent Baisley
Why use a javascript to create a new window? Any link can be directed 
to a new window with a simple target=.

a href=search.php?ID=$companyIDType=Industry target=Industry

Industry would be the reference name of the window. For instance, if 
you wanted to refer to it from another window.

PHP is server side, all it does is serve up a resulting page to a 
client. The client has no idea that PHP is being used, nor does it 
care. To answer your question you can't do it in PHP, but you can do it 
using HTTP, HTML and/or Javascript.

On Friday, September 19, 2003, at 02:13 PM, Rich Fox wrote:

And if you are not in a form? My current code is:

a href=search.php onClick=return popup(this,
'Industry','?ID=$companyIDType=Industry')
   img src=images/Plus.gif
 /a
where popup is my javascript function. But as I said below, the popup
doesn't work as expected and I do not want to use javascript. I can 
also not
be in a form. Suggestions?

Rich

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session and Server variable problem

2003-09-19 Thread CPT John W. Holmes
From: Stephen Schneider [EMAIL PROTECTED]

 Have an interesting problem.  Worked on a web site for a client.  They
 have the server (IIS) set up and we are using php.  Have been working
 with their domain with a .net extension.  To go live, they repointed
 their .com domain to the web folder.  Same spot the .net points to.  But
 now server and session variables aren't working.  They still work if we
 use .net but not .com.  Can't set or read them.  Anyone run into this
 before?

Sessions, by default, rely on cookies to propogate the session ID. You are
somehow setting the domain of the cookie to the .net address, more than
likely.

There are a multitude of ways you can do it, though. Check your
session.cookie_domain in php.ini. Check if it's being set with
session_set_cookie_params() or ini_set() or if the cookie is being created
manually with setcookie().

---John Holmes...

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



Re: [PHP] Web server file perms || More than I can chew.....

2003-09-19 Thread CF High
Thanks for the informative post, Lowell  Marek.

Our host suggested chmod-ing necessary directories via ftp.  Completely
defeats the purpose of my app which is supposed to allow the client to
maintain the site themselves; not have me mess around with directory/file
perms -- ugggh

In any case, I'm more than a little frustrated that the app works like a
dream locally; now, I have to hack around to get it working live.  I'm not a
huge fan of the latest version of php now either.  I was able to open
external files (e.g. http://somesite.com/index.php) with fopen(); no such
luck in this realease.  Getting a freaking php_hostconnect: connect failed
error message now.

My mood is down the tubes at present -- waiting for some divine inspiration
as my efforts to slog it out have me stewing..

--Noah


Lowell Allen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
  On my local machine (win2k pro, apache), no problems -- everything works
  just as designed.
 
  Today I began testing on the live server; i.e. my client's hosting
company
  (linux, apache 1.3.27, php 4.3.1)  -- that's when the trouble started.
 
  The site builder app builds static pages based on changes made by users
in
  our online administration center.  When I test out creating a new site
  section; i.e. triggering my make_file function(writes page content to
new
  file) I receive the following error:
 
  Warning: fopen(/local_server_path/file_to_create.php) [function.fopen]:
  failed to create stream: Permission denied
 
  I've attempted to chmod(777) my testing directory via ftp client, which
  appears to work; however, when I fileperms($file_in_test_dir), I get
  chmod(644), so clearly I'm not the owner.
 
  Pardon my ignorance here, but I as yet know little about dir/file perms.
  Should I contact the host and have them give me sufficient permissions?

 If you create a subdirectory of the root level public HTML directory, then
 PHP can create files there, but not in the root level directory. If you
 change permissions to 777, PHP can create files there, but it's not a good
 idea to have the permissions that wide-open.

 You might be able to get your commercial host to change who PHP is running
 as from nobody to your login identity, then PHP could write to the root
 level directory, but you might not be able to -- my main host says they're
 changing policy for security reasons to not allow that.

 You could put the static files in a subdirectory where PHP will have
 permission to create files. But this might require lots of reworking links
 depending on your site design, and thus not be a viable option.

 You could set up a PHP script to be executed by a crontab as a CGI. Done
 this way, PHP can write to the root level directory. This is what I did
 recently for a similar problem. The content management system provides a
 link for updating static HTML pages. That link (script) writes info to the
 database, flagging an update request. Every 5 minutes, a crontab calls the
 PHP CGI script that actually does the update. The script checks the
database
 flag and does the updates if they've been requested (flagged).

 Bottom line -- discuss the problem with your commercial host and see what
 they suggest.

 --
 Lowell Allen

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



[PHP] um...

2003-09-19 Thread Comex
[EMAIL PROTECTED]
[EMAIL PROTECTED]:
 Please contact your system administrator.


 The scanned document was deleted.


 Violation Information:
 The subject violated the content filtering rule PHP as subject is a
 malacious code - Not Allowed.  No attempt was made to repair.
umm... since it doesn't come from [EMAIL PROTECTED], spells things wrong, and
raises issues over the subject Re: [PHP-WIN] generate img with fonts..., I
think it's fake... let me know if I'm wrong.

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



[PHP] Re: um...

2003-09-19 Thread Comex
[EMAIL PROTECTED]
Comex:
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]:
 Please contact your system administrator.


 The scanned document was deleted.


 Violation Information:
 The subject violated the content filtering rule PHP as subject is a
 malacious code - Not Allowed.  No attempt was made to repair.
 umm... since it doesn't come from [EMAIL PROTECTED], spells things
 wrong, and raises issues over the subject Re: [PHP-WIN] generate img
 with fonts..., I think it's fake... let me know if I'm wrong.

Guess what, I got another one.  From posting this.

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



[PHP] Re: um...

2003-09-19 Thread Comex

 Guess what, I got another one.  From posting this.


Never mind, I see another thread. sorry

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



Re: [PHP] um...

2003-09-19 Thread R'twick Niceorgaw
Comex said the following on 9/19/2003 3:33 PM

[EMAIL PROTECTED]
[EMAIL PROTECTED]:
Please contact your system administrator.

The scanned document was deleted.

Violation Information:
The subject violated the content filtering rule PHP as subject is a
malacious code - Not Allowed.  No attempt was made to repair.
umm... since it doesn't come from [EMAIL PROTECTED], spells things wrong, and
raises issues over the subject Re: [PHP-WIN] generate img with fonts..., I
think it's fake... let me know if I'm wrong.
its because of the new PHP virus (PHP.virdrus) and opussoft's anti virus 
  program decided not to accept any mails that contains the word php. 
aparently some one from that company subscribed to php lists but is not 
aware of their mail server settings now. I tried to mail the tech 
contact for opussoft.com ( [EMAIL PROTECTED] as listed in 
whois) but seems his a/c is over quota.

so unless the person from opussoft is unsubscribed from the list, we r 
going to get this mail each time we post to the list.

R'twick

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


  1   2   >