[PHP] Re: The final script! but still some problems..

2004-01-29 Thread Radwan Aladdin
So what is the problem?
  - Original Message - 
  From: Radwan Aladdin 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, January 29, 2004 10:40 AM
  Subject: The final script! but still some problems..


  Hi all..

  This is the final PHP code that I written.. but there i some problems.. not errors.. 
I said problems.. For example the Distance value is not updated correctly.. and the 
LessonNumber field also.. please help me fixing these problems :

  


  I'm sure it is very easy for you.. I hope that..
  Regards..


[PHP] Integration between ASP & PHP.

2004-01-29 Thread francesco
Hi all,
is possible to integrate script in ASP with script in PHP?
How can I do this?
All helps are precious.
Best regards.

[PHP] crypt() sources c# port

2004-01-29 Thread gerold kathan
hi there - i have user credentials in my DB encrypted with PHPs crypt()
function - and should be able to do some user authentication from a c#
client - where can i find the source code of PHPs crypt() function so that i
can build the same function in c# ?

grettings from vienna ,
gerold.

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



[PHP] Oracle + PHP

2004-01-29 Thread Luis Moran Ochoa
Hello

I have Oracle 9 + RedHat 7 + PHP 4.3.4 + Apache 1.3.29.

I've compiled apache and php I've compiled PHP using the 
documentation and activating OCI.

I've build the typical  script for starting apache, it's like this:

$ORACLE_HOME=blablahblah...
 more oracle variables 
case "$1" in
start)
   /opt/apache/bin/apachectl startssl
  ;;
stop)
/opt/apache/bin/apachectl stop
  ;;
esac
But the problem is the next:

When I login as root (on a console or an xterm) and run that script 
(/etc/init.d/apache start) everything works
fine.

So I've created a link from /etc/rc5.d/S99apache to /etc/init.d/apache 
for starting it during boot process..

But when I  reboot the system and apache is started on boot (oracle is 
launche thru S20oracle), it start. If you request a php page or other
kind of webpage it works fine, until you request a php page that 
connects to oracle Then the instance that is serving that request dies,
raise an error that says something like "Couldn't connect to database" 
and no more php+oracle pages can be requested... But php and apache
still works.

If I stop apache and launch it again from console using 
/etc/init.d/apache start It works again and works fine, all 
connections are successfull.

User apache belongs to oinstall group and have read and execution access 
to all the oracle directories.

Where can be the problem Why it works if I launch it from a console 
or xterm and not if the system starts it???

Thank you

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


[PHP] Re: Copyrighting PHP, MySql, Apache,perl etc...

2004-01-29 Thread Peter Clarke
Ryan A wrote:
Which brings up a little question, any idea of whats ZEND's (or anybody else
that matters) opinion
of using PHP in a domain name?
eg: my-lovely-php-and-apache-website.com
Have a look at http://www.php.net/license/
"We cannot really stop you from using PHP in the name of your project 
unless you include any code from the PHP distribution, in which case you 
would be violating the license. But we would really prefer if people 
would come up with their own names independent of the PHP name.

Why you ask? You are only trying to contribute to the PHP community. 
That may be true, but by using the PHP name you are explicitly linking 
your efforts to those of the entire PHP development community and the 
years of work that has gone into the PHP project. Every time a flaw is 
found in one of the thousands of applications out there that call 
themselves "PHP-Something" the negative karma that generates reflects 
unfairly on the entire PHP project. We had nothing to do with PHP-Nuke, 
for example, and every bugtraq posting on that says "PHP" in it. Your 
particular project may in fact be the greatest thing ever, but we have 
to be consistent in how we handle these requests and we honestly have no 
way of knowing whether your project is actually the greatest thing ever."

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


Re: [PHP] crypt() sources c# port

2004-01-29 Thread Martin Luethi
download the source code:
http://www.php.net/downloads.php
or browse online:
http://cvs.php.net
the crypt() source is under php-src/ext/standard/

g. tinu

Thu, 29 Jan 2004 09:54:39 +0100 gerold kathan <[EMAIL PROTECTED]>:
hi there - i have user credentials in my DB encrypted with PHPs crypt()
function - and should be able to do some user authentication from a c#
client - where can i find the source code of PHPs crypt() function so that i
can build the same function in c# ?
grettings from vienna ,
gerold.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Create a zip archive from a folder

2004-01-29 Thread Matt Palermo
Hello.  Does anyone know how I can easily create a zip archive from a folder
on my server?  I have a library class that will do this for a tar file (I
just give it the folder name and the archive name and it creates the tar
file for me very easily).  I was wondering if there is anything really easy
like this for creating zip files.  Please let me know.

Thanks,

Matt
http://sweetphp.com/

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



[PHP] Size of Arrays

2004-01-29 Thread Gandolf
Hello NG,
could anyone tell me how much is be the biggest size of an array - how many
values could an array have?!
I have to import 100.000 to 10.000.000 values an I have to know where the
limit is.

Thanks a lot,

Sandro

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



[PHP] Re: Create a zip archive from a folder

2004-01-29 Thread Daniel Pupius
I have achieved this using the shell_exec() function:

$cmd = "cd ".escapeshellarg($curdir).";zip -r9b .
".escapeshellarg($name)." *";
$result = shell_exec($cmd);

This moved the shell into the current directory ($curdir), then creates a
new zip file ($name) for the entire directory.

I have noticed that shell_exec() has unexpected results with certain
commands, i.e. if it fails you won't always get the same message that you'd
get at the command prompt.



"Matt Palermo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello.  Does anyone know how I can easily create a zip archive from a
folder
> on my server?  I have a library class that will do this for a tar file (I
> just give it the folder name and the archive name and it creates the tar
> file for me very easily).  I was wondering if there is anything really
easy
> like this for creating zip files.  Please let me know.
>
> Thanks,
>
> Matt
> http://sweetphp.com/

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



[PHP] Storing MS Word documents

2004-01-29 Thread bob pilly
Hi all

Im having problems storing a MS word document as an
image data type in a MS SQL Server 2000. Im getting as
far as the query but i am getting the following error:

Warning: mssql_query(): message: Unclosed quotation
mark before the character string
'ÐÏࡱá'.
(severity 15) in /var/www/htdocs/searches3.php on line
23
Warning: mssql_query(): Query failed in
/var/www/htdocs/searches3.php on line 23
Couldn't add file to database

Here is the code leading up to it
//lets open the file and read the contents
$filehandle = fopen($tmpfilename, "r");
$filecontent = fread($filehandle, $filesize);
//addslashes so that it can be stored in the database
$data = addslashes($filecontent);
//now we need to do the query to insert the word doc
into the database
$query = "insert into temp1 (id,leadsheet) values
('$phonenum','$data')";
mssql_query($query,$numero) or die("Couldn't add file
to database");

..

It seems to me that the addslashes isnt working and
the  query is failing because of this? Has anyone seen
this before or know what i am doing wrong? Ive been on
this for ages and are not getting anywhere.. Thanks
for any help in advance!

Bob



BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 
http://btyahoo.yahoo.co.uk

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



Re: [PHP] Storing MS Word documents

2004-01-29 Thread Stuart
bob pilly wrote:
It seems to me that the addslashes isnt working and
the  query is failing because of this? Has anyone seen
this before or know what i am doing wrong? Ive been on
this for ages and are not getting anywhere.. Thanks
for any help in advance!
You don't escape single quotes with MSSQL you repeat them. Try this 
instead...

$data = str_replace("'", "''", $filecontent);

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


Re: [PHP] Storing MS Word documents

2004-01-29 Thread bob pilly
Thanks Stuart. I tried that and i still get this
error:

 Warning: mssql_query(): message: Unclosed quotation
mark before the character string 'ÐÏࡱá'. (severity
15) in /var/www/htdocs/searches3.php on line 23

Warning: mssql_query(): message: Line 1: Incorrect
syntax near 'ÐÏࡱá'. (severity 15) in
/var/www/htdocs/searches3.php on line 23

Warning: mssql_query(): Query failed in
/var/www/htdocs/searches3.php on line 23
Couldn't add file to database

--- Stuart <[EMAIL PROTECTED]> wrote: > bob pilly
wrote:
> > It seems to me that the addslashes isnt working
> and
> > the  query is failing because of this? Has anyone
> seen
> > this before or know what i am doing wrong? Ive
> been on
> > this for ages and are not getting anywhere..
> Thanks
> > for any help in advance!
> 
> You don't escape single quotes with MSSQL you repeat
> them. Try this 
> instead...
> 
> $data = str_replace("'", "''", $filecontent);
> 
> -- 
> Stuart
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>  


BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 
http://btyahoo.yahoo.co.uk

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



Re: [PHP] Size of Arrays

2004-01-29 Thread David T-G
Sandro --

...and then Gandolf said...
% 
% Hello NG,

Hello from the mailing list :-)


% could anyone tell me how much is be the biggest size of an array - how many
% values could an array have?!
% I have to import 100.000 to 10.000.000 values an I have to know where the
% limit is.

1) I know of no practical limit, though realistically it's probably
MAXINT or so.

2) Five minutes with a test script would tell you, and I bet google could
tell you, so why bother the list with a question you could so easily
answer for yourself?  Go and try it and then report back where (if at
all) it breaks.  My bet is that you'l exhaust RAM and swap before you
break php, especially if you actually store something -- like, say, 32
bytes of useless string output -- in each entry.


% 
% Thanks a lot,
% 
% Sandro


HTH & HAND & Good luck

:-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] Create a zip archive from a folder

2004-01-29 Thread David T-G
Matt --

...and then Matt Palermo said...
% 
% Hello.  Does anyone know how I can easily create a zip archive from a folder

I can't say for certain that it will create, but the pclzip class from
Vincent Blavet seems pretty good and I use it extensively for extraction.
His site is

  http://phpconcepts.net/

but that seems a little sicko at the moment, so you might try sourceforge
instead.  If you google for pclzip you'll get lots of links.


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


RE: [PHP] Still error messages!!

2004-01-29 Thread Jay Blanchard
[snip]
So why it is making the Distance value = 0 and it doen't update the
value in
the database. (Because it must update the value in the database by it)
[/snip]

It is because you are not properly retrieving your query results and
placing properly in variables those results. You need to spend some time
with PHP / MySQL tutorials. Search for them on Google. Break down each
section of your code to see why it doesn't work. And spend some time
with TFM.

P.S. Please do not reply off-list as people will generally not respond.

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



Re: [PHP] Googlebot (not another rtfm-mail)

2004-01-29 Thread Chris Hayes
At 17:58 28-1-04, you wrote:
On Wed, Jan 28, 2004 at 11:51:06 -0500, Michael Mulligan wrote:
> Googlebot visits my site occasionally and follows a lot of my PHP links
> with long query strings...

same here, google has been indexing my php site for over 3 years now :)
I find the google site is NOT very helpful for PHP guidelines, considering 
my experiences.

I used the error_document 404 redirect trick to use short links and it took 
some time to realise that Google boycotted that, probably because it gets a 
404.

Also links with a long parameter string of (5 parameters, >30 characters) 
were ignored.  As far as I could see Google only indexed 1 index.php page. 
So I had to overhaul the whole link logic of my cms. I now use mod_rewrite too.

But I have seen sites with only an one parameter (?ID=11) being indexed.

Be aware that javascript links and form buttons are unlikely to be indexed.

Chris

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


Re: [PHP] Size of Arrays

2004-01-29 Thread Stuart
David T-G wrote:
2) Five minutes with a test script would tell you, and I bet google could
tell you, so why bother the list with a question you could so easily
answer for yourself?  Go and try it and then report back where (if at
all) it breaks.  My bet is that you'l exhaust RAM and swap before you
break php, especially if you actually store something -- like, say, 32
bytes of useless string output -- in each entry.
Indeed. The following script had my machine happily swapping like crazy 
at 320,000 array items (each being 1k, task manager showed 640meg total 
memory in use on this development machine with 512meg RAM running WinXP).


To the OP, why do you need to store all the items in memory at the same 
time? Can't you read some, process them then read the next lot, process 
them, read the next lot etc?

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


Re: [PHP] Storing MS Word documents

2004-01-29 Thread bob pilly
Have sorted this out now. Theres a bit about storing
binary data in the mssql docs:

http://uk.php.net/function.mssql-query

Just in case anyone wanted to know.

 --- Stuart <[EMAIL PROTECTED]> wrote: > bob
pilly wrote:
> > It seems to me that the addslashes isnt working
> and
> > the  query is failing because of this? Has anyone
> seen
> > this before or know what i am doing wrong? Ive
> been on
> > this for ages and are not getting anywhere..
> Thanks
> > for any help in advance!
> 
> You don't escape single quotes with MSSQL you repeat
> them. Try this 
> instead...
> 
> $data = str_replace("'", "''", $filecontent);
> 
> -- 
> Stuart
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>  


BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 
http://btyahoo.yahoo.co.uk

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



[PHP] PH error: Parse error: parse error, unexpected $end

2004-01-29 Thread Denham Eva
Hello List,

I am trying to learn PHP and finding it very "difficult" as the books which
I am using's code does not work properly.
And I have taken to using the Manual available from PHP.net, but still
struggling terribly
I have a script which receives data from an HTML form and the idea is to
insert it into a mysql database.
However I just can not get passed this error:

Parse error: parse error, unexpected $end 
Please can someone help!

Here is the code:-



Insert Page


";
   exit;
 }
 
 $category = addslashes($category);
 $description = addslashes($description);
 $requestor = addslashes($requestor);
 
@ $db = mysql_connect("localhost", "", "x");

  if (!$db) {
 echo "DB not available!";
 exit;}
 
 mysql_select_db("");
 
 $query = "insert into work

values('".$category."','".$description."','".$requestor."');
 
 $result = mysql_query($query);
 
 if (!$result) {
  echo mysql_error();
exit;
}
 
 if($result){
 echo mysql_affected_rows();
   }
 
 mysql_close($db);
?>






Denham Eva
ORACLE Administrator and Developer.
Tel: (012) 6418292
Cel:0845043617

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



[PHP] Show Results one at a time ?

2004-01-29 Thread Dave Carrera
Hi List,

I have a test function who's aim is to take an array an do something which
each value of the array and show the result on screen one at a time.

--- Test Function Code ---

function TestFunc(){
$cnt = array(1,2,3,4,5,6,7,8,9,10);
$i=0;

while($i <=count($cnt)){
 set_time_limit(2);
  echo $cnt[$i].str_repeat(" ", 300) . "";;
 ob_flush();
flush();
$i++;
}

--- End ---

This just shows the output after processing all of the function which is the
behaviour of php as a server side engine, but after reading the manual I
thought the combination of flush() and ob_flush() would do what I wanted,
but I obviously got the wrong end of the stick which flush() and what is
dose.

So I ask the list if there is a way to show success or fail results for each
of the values of an array one at a time:

I.e.:

1 = done
Wait 1 second
2 = done
Wait 1 second

And so on and so on. It will eventually show the progress of a dynamic MySql
query.

I know my func dose not contain any controls to test success or fail and the
func will be all success until I do but I can add that later when I have,
with your help, sorted out a way to do what I want.

I have no problem if this has to be a combo between js and php.

Thank you in advance for any help or examples with the issue.

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004
 

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



[PHP] form action does not give var value's through.

2004-01-29 Thread Nico Berg
Hi guys,
I have two .php files. The one gives his values to the other but they never
reach the second file.
I am 100% about the code!

Is ther something that can be changed in the php.conf on my server?

Gr, thank's Nico Berg


Re: [PHP] form action does not give var value's through.

2004-01-29 Thread Stuart
Nico Berg wrote:
I have two .php files. The one gives his values to the other but they never
reach the second file.
I am 100% about the code!
Is ther something that can be changed in the php.conf on my server?
Without code it's hard to say, but it's likely to be register_globals 
related. Read about it here: http://php.net/register_globals

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


RE: [PHP] Show Results one at a time ?

2004-01-29 Thread Ford, Mike [LSS]
On 29 January 2004 12:51, Dave Carrera wrote:

> Hi List,
> 
> I have a test function who's aim is to take an array an do something
> which each value of the array and show the result on screen one at a
> time. 
> 
> --- Test Function Code ---
> 
> function TestFunc(){
> $cnt = array(1,2,3,4,5,6,7,8,9,10);
> $i=0;
> 
> while($i <=count($cnt)){
>  set_time_limit(2);
>   echo $cnt[$i].str_repeat(" ", 300) . "";;
>  ob_flush();
> flush();
> $i++;
> }
> 
> --- End ---

Your understanding of ob_flush() and flush() looks right.  However, at the
moment you've got nothing in there to insert a delay between the echos, so
it'll all just be whizzing out at top speed.

Try inserting a sleep(1) into the body of the loop, to wait for 1 second on
each iteration.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Size of Arrays

2004-01-29 Thread David T-G
Stuart, et al --

...and then Stuart said...
% 
% David T-G wrote:
% >2) Five minutes with a test script would tell you, and I bet google could
...
% >all) it breaks.  My bet is that you'l exhaust RAM and swap before you
% >break php, especially if you actually store something -- like, say, 32
% >bytes of useless string output -- in each entry.
% 
% Indeed. The following script had my machine happily swapping like crazy 
% at 320,000 array items (each being 1k, task manager showed 640meg total 
% memory in use on this development machine with 512meg RAM running WinXP).
[snip]

*grin*

We can figure, then, that if you cut down to 32b you'll probably get to
about a million entries, which is a nice, BIG, round[ish] number.  You
ought to give it a go.

My laptop and my dev server are in the middle of a 12G transfer, and my
production servers are, well, production, so I can't try this now, but if
there's interest I'll give it a go later.  My dev box (LFS Linux) only
has 384M RAM, though, so it won't be anything awesome.  A buddy of mine
hosts on a 2G [quad Xeon -- yum!] box with another 2G of swap, but he'd
kill me if I took down his business!

Anyone (perhaps at some company with deeper pockets than mine) have a
hefty dev server that could risk a crash in the name of playing "mine's
bigger"? :-)


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


RE: [PHP] Show Results one at a time ?

2004-01-29 Thread Dave Carrera
--- updated with Sleep() ---
function TestFunc(){
$cnt = array(1,2,3,4,5,6,7,8,9,10);
$i=0;

while($i <=count($cnt)){
//sleep(1);
 set_time_limit(2);
//sleep(1);  
   echo $cnt[$i].str_repeat(" ", 300) . "";;
  sleep(1);
 ob_flush();
flush();
//sleep(1);
$i++;
}
--- End --- 

Wherever I put sleep(1), notice the comments, in the func all it dose is
wait 10 seconds then shows the full output and not each result 1 at a time
to the screen.

Any further guidance is very much appreciated.

Dave C


-Original Message-
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] 
Sent: 29 January 2004 13:12
To: 'Dave Carrera'; [EMAIL PROTECTED]
Subject: RE: [PHP] Show Results one at a time ?


On 29 January 2004 12:51, Dave Carrera wrote:

> Hi List,
> 
> I have a test function who's aim is to take an array an do something 
> which each value of the array and show the result on screen one at a 
> time.
> 
> --- Test Function Code ---
> 
> function TestFunc(){
> $cnt = array(1,2,3,4,5,6,7,8,9,10);
> $i=0;
> 
> while($i <=count($cnt)){
>  set_time_limit(2);
>   echo $cnt[$i].str_repeat(" ", 300) . "";;
>  ob_flush();
> flush();
> $i++;
> }
> 
> --- End ---

Your understanding of ob_flush() and flush() looks right.  However, at the
moment you've got nothing in there to insert a delay between the echos, so
it'll all just be whizzing out at top speed.

Try inserting a sleep(1) into the body of the loop, to wait for 1 second on
each iteration.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS,  LS6
3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 27/01/2004
 

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



[PHP] random?

2004-01-29 Thread Chris
$sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
(agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and
agentdb.agent_id <> 333)) ORDER BY RAND() LIMIT 1";

The above code should generate a random agent upon refresh.

It does however seem to favor one agent more than the others. The agent id

it used to favor was "333" i added the "(agentdb.agent_id <> 333)" to

disallow that agent from being displayed. But now it wants to favor an agent

whose id number is "1167553"

The function can be seen here: http://c21alliancerealty.com/area.php it is

the random "Featured Agent" on the left hand side of the page.

Does anyone have any suggestions as to why this is occuring, please?

##
Glyndower Web Designs
http://www.glyndower.com
352.684.2290
##
"What are we holding on to Sam?"
"That theres some good in this world, Mr. Frodo, and it's worth fighting
for."



RE: [PHP] sending a hex string as it is?

2004-01-29 Thread Khoa Nguyen
I guess I confused the matter by mentioning hex. The problem is the same
with decimal number; for example


I guess "echo" function treats $var as a string. Maybe I am looking for
a function that will sends a data stream as it is

Thanks,
Khoa 
 

-Original Message-
From: David OBrien [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 28, 2004 3:25 PM
To: Khoa Nguyen
Subject: RE: [PHP] sending a hex string as it is?


Also
http://www.php.net/manual/en/function.sprintf.php
has provisions for using  hex and octal numbers
-dave

At 02:17 PM 1/28/2004, you wrote:
>Thanks for the info Dave, but I still can't make it work:
>
> $var = 0x10; // decimal 16
> echo $var;  // case 1
> echo strval($var);  // case 2
>?>
>
>In both cases, I see 3136 (ASCII encoded of string "16") on the wire 
>:-(
>
>Any ideas?
>
>Khoa
>
>-Original Message-
>From: David OBrien [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, January 28, 2004 2:08 PM
>To: Khoa Nguyen; [EMAIL PROTECTED]
>Subject: Re: [PHP] sending a hex string as it is?
>
>
>At 02:03 PM 1/28/2004, Khoa Nguyen wrote:
>
> >$var = 0x8180;
> >
> >How do I send $var to the browser as it is? In other words, if 
> >sniffing
>
> >on the wire, I should see 8180, not 38 31 38 30.
>
>
>I think
>http://www.php.net/manual/en/function.strval.php
>would work here
>-Dave
>
> >Thanks for your help.
> >Khoa
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

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



Re: [PHP] Show Results one at a time ?

2004-01-29 Thread Rob Adams
If you're using the command line, ignore this comment.


"Dave Carrera" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> --- updated with Sleep() ---
> function TestFunc(){
> $cnt = array(1,2,3,4,5,6,7,8,9,10);
> $i=0;
>
> while($i <=count($cnt)){
> //sleep(1);
>  set_time_limit(2);
> //sleep(1);
>echo $cnt[$i].str_repeat(" ", 300) . "";;
>   sleep(1);
>  ob_flush();
> flush();
> //sleep(1);
> $i++;
> }
> --- End ---
>
> Wherever I put sleep(1), notice the comments, in the func all it dose is
> wait 10 seconds then shows the full output and not each result 1 at a time
> to the screen.

This is probably due to the browser you are using.  I've noticed that IE
tends to not show everything on a page until the entire page (or a certain
element) has finished loading, while Mozilla tries to display data as it
comes.  I'm not accusing you of using IE, but you might want to try a
different browser or technique to see if that displays more like you would
expect.

>
> Any further guidance is very much appreciated.
>
> Dave C
>

  -- Rob

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



RE: [PHP] Fopen and streams

2004-01-29 Thread firephreek
Ok, so, I solved the problem, but haven't necessarily figured it out.
I was using fopen() on a unique device, and getting a stream error.
Rewrote the func using the basic example for fsockopen.  I can now get
the data I need without the errors, but now, a new question:

If indeed there was some sort of incompatiblity between the scheme that
fopen() was using to get at my device, where do I start to find out what
kind of scheme I could be using?  Do I hunt down the manufacturer and
get some tech papers on their device?  Or could I / should I use
something like nmap, if that would work at all.   It just now occurred
to me, and I haven't tried it yet.

Secondly, where is a good place to read on the standards and formats
used by these different schemes.  In the fsockopen() func, I made some
writes to 'GET / ' and 'HTTP 1.1' etc... After reading the script, I
understand what these imply, but not the importance, also, what other
commmands are available to me.  Does that all make sense?  
I guess more simply put: How do I know what commands are availble to me
in the different protocals.  HTTP, FTP, UDP, etc...what if I wanted to
get at the data through straight TCP, is that possible?

Lastly, where should I go to read up on how to make my scripts run
faster?  I haven't written anything to large, but I'm generalyy paranoid
about overhead, esp in areas I probably don't need to be worried about.
Silly questions I suppose, like, is it more efficient to echo one long
string or echo parts of it on separate lines.  The latter is easier when
creating tables and such, because I can comment out individual lines to
hunt down bugs.  But does it make a difference in the runtime of the
script?  Etc

Stryder "way too early right now" Crown

-if God had meant for me to sleep right now, he wouldn't have invented
penguin mints.  Now in Cinnamon!



-Original Message-
From: stryder [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 28, 2004 7:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Fopen and streams


Hi, first time poster here.  

Having some trouble with a line that used to work, but doesn't now.

$pg = fopen("http://$ip/mypage";, "r");

Gets me:

Warning: fopen(http://10.1.1.233/mypage): failed to open stream: HTTP
request failed! 

And then it spits out the data from that page anyways.  What's going on
here?  This was working on my other box a few days ago.  
And I've tried it with and without the variable for the ip address/url.

--Stryder

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



Re: [PHP] random?

2004-01-29 Thread John W. Holmes
From: "Chris" <[EMAIL PROTECTED]>


> $sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
> (agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and
> agentdb.agent_id <> 333)) ORDER BY RAND() LIMIT 1";

> It does however seem to favor one agent more than the others.

> Does anyone have any suggestions as to why this is occuring, please?

I'd ask on a MySQL list/forum. This isn't going to be a PHP issue. Maybe
MySQL's RAND() function isn't very random.

---John Holmes...

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



[PHP] Finding news items by Month

2004-01-29 Thread Michael Hill
I have a bunch of news items in a database. All of them have a date
associated with them. I am trying to make a function that queries the db
and tells me which months have newsitems in them(if any at all), and how
many each of the months have.

I'm a newbie to php, so this is proving very difficult for me. Any help
would be much appreciated,

Cheers,

Mike

 
Michael Hill
Senior Developer
Holler 

02076891942
www.holler.co.uk


This message is confidential, you may use and apply the information only
for the intended purpose. Internet communications are not secure and
therefore Holler does not accept legal responsibility for the
contents of this message. Any views or opinions expressed are solely
those of the author and may not represent those of Holler.
If you are not the intended recipient, any disclosure, copying,
distribution
or use of it, or any part of it, in any form whatsoever, and any actions
taken or omitted to be taken in reliance on it, is prohibited and may
be unlawful. 

 


Re: [PHP] random?

2004-01-29 Thread Ryan A
> > $sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
> > (agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and
> > agentdb.agent_id <> 333)) ORDER BY RAND() LIMIT 1";
>
> > It does however seem to favor one agent more than the others.
>
> > Does anyone have any suggestions as to why this is occuring, please?
>
> I'd ask on a MySQL list/forum. This isn't going to be a PHP issue. Maybe
> MySQL's RAND() function isn't very random.

Yeah, this has happened to me too, and its frustrating.
But my script is a little different, first I am ordering my the guys who are
sponsoring (so their
results come up first in the search with a  graphic) and then the
rest via RAND(),
 except it seems to be taking a secret mysql function called
SCREW_YOU_I_WONT_RAND()
:-)

If you do find something please share back here.

Cheers,
-Ryan

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



[PHP] Re: random?

2004-01-29 Thread Rob Adams
"Chris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> $sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
> (agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and
> agentdb.agent_id <> 333)) ORDER BY RAND() LIMIT 1";
>
> The above code should generate a random agent upon refresh.
>
> It does however seem to favor one agent more than the others. The agent id
>
> it used to favor was "333" i added the "(agentdb.agent_id <> 333)" to
>
> disallow that agent from being displayed. But now it wants to favor an
agent
>
> whose id number is "1167553"
>
> The function can be seen here: http://c21alliancerealty.com/area.php it is
>
> the random "Featured Agent" on the left hand side of the page.
>
> Does anyone have any suggestions as to why this is occuring, please?

I don't have any suggestions as to why this happens.  Very strange.  One
thing you could do instead is depend on PHP's random numbers.

srand ((double) microtime() * 100);
$r = mysql_query('select count(*) as cnt from agentb');
$cnt = mysql_result($r, 0, 0);
mysql_free_result($r);
$rnd = rand(1, $cnt);
$sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
(agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and
agentdb.agent_id <> 333)) LIMIT $rnd, 1";

A bit more work than just relying on MySQL, but maybe it will actually be
random...

  -- Rob

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



RE: [PHP] random?

2004-01-29 Thread Chris
Yup, I had that same thought AFTER I sent the post :)

Sorry gang.

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 9:00 AM
To: Chris; [EMAIL PROTECTED] Php. Net
Subject: Re: [PHP] random?


From: "Chris" <[EMAIL PROTECTED]>


> $sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
> (agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and
> agentdb.agent_id <> 333)) ORDER BY RAND() LIMIT 1";

> It does however seem to favor one agent more than the others.

> Does anyone have any suggestions as to why this is occuring, please?

I'd ask on a MySQL list/forum. This isn't going to be a PHP issue. Maybe
MySQL's RAND() function isn't very random.

---John Holmes...

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



Re: [PHP] Show Results one at a time ?

2004-01-29 Thread John W. Holmes
From: "Dave Carrera" <[EMAIL PROTECTED]>

> Wherever I put sleep(1), notice the comments, in the func all it dose is
> wait 10 seconds then shows the full output and not each result 1 at a time
> to the screen.

Are you running this over the web or on the command line? Even though your
script is staggering the output, your web server or something else may be
caching it and sending it all at once.

---John Holmes...

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



Re: [PHP] Finding news items by Month

2004-01-29 Thread John W. Holmes
From: "Michael Hill" <[EMAIL PROTECTED]>


> I have a bunch of news items in a database. All of them have a date
> associated with them. I am trying to make a function that queries the db
> and tells me which months have newsitems in them(if any at all), and how
> many each of the months have.

You should mention what database you're using when you ask questions like
this. Try:

SELECT MONTH(date_column), COUNT(*) FROM table GROUP BY MONTH(date_column);

---John Holmes...

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



RE: [PHP] Sessions not working.

2004-01-29 Thread Gryffyn, Trevor
Random thought.. Did you check your PHP.INI on the 'bad' server to make
sure that it's configured the same as the 'good' server?

Some things to check:

Session.use_cookies = 1
Session.auto_start = 0  // This is the first one I'd check.  If you have
it set to =1 on the good server and aren't doing a session_start(), that
could do it I think

There are a bunch of other Session related parameters in PHP.INI..
Default timeout value.. If that's set too low, the session might
vaporize before you get a chance to see the info, etc.

Good luck!

-TG

> -Original Message-
> From: Jeff McKeon [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 28, 2004 7:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sessions not working.
> 
> 
> Pulling my hair out here.
> 
> I've got an IIS5 webserver running a php website just fine.
> 
> I created another web for a dev version of the first website. 
>  Installed
> PHP ect...
> When I load up the old websites files on the new site sessions won't
> work on the new site.
> 
> For some reason on the new site's phpinfo.php page, there is no
> HTTP_COOKIE variable set under the "environmental" section.
> 
> Also, under the PHP Variables section, there is no 
> _REQUEST["PHPSESSID"]
> or _COOKIE["PHPSESSID"] variable.
> 
> What have I missed!???
> 
> Here is a section of the phpinfo() for both sites.
> 
> Good Site:
> 
> Environment
> Variable Value 
> ALLUSERSPROFILE  C:\Documents and Settings\All Users  
> CommonProgramFiles  C:\Program Files\Common Files  
> COMPUTERNAME  WS02TC07927  
> ComSpec  C:\WINNT\system32\cmd.exe  
> CONTENT_LENGTH  0  
> GATEWAY_INTERFACE  CGI/1.1  
> HTTPS  off  
> HTTP_ACCEPT  */*  
> HTTP_ACCEPT_LANGUAGE  en-us  
> HTTP_CONNECTION  Keep-Alive  
> HTTP_HOST  opsup.telaurus.net  
> HTTP_USER_AGENT  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)  
> HTTP_COOKIE  PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f  
> HTTP_ACCEPT_ENCODING  gzip, deflate  
> INSTANCE_ID  3  
> LOCAL_ADDR  10.16.1.21  
> NUMBER_OF_PROCESSORS  1  
> Os2LibPath  C:\WINNT\system32\os2\dll;  
> OS  Windows_NT  
> Path  C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem  
> PATHEXT  .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH  
> PATH_INFO  /phpinfo.php  
> PATH_TRANSLATED  C:\Inetpub\wwwOpSup\phpinfo.php  
> PROCESSOR_ARCHITECTURE  x86  
> PROCESSOR_IDENTIFIER  x86 Family 6 Model 8 Stepping 10, GenuineIntel  
> PROCESSOR_LEVEL  6  
> PROCESSOR_REVISION  080a  
> ProgramFiles  C:\Program Files  
> REMOTE_ADDR  10.16.2.55  
> REMOTE_HOST  10.16.2.55  
> REQUEST_METHOD  GET  
> SCRIPT_NAME  /phpinfo.php  
> SERVER_NAME  opsup.telaurus.net  
> SERVER_PORT  80  
> SERVER_PORT_SECURE  0  
> SERVER_PROTOCOL  HTTP/1.1  
> SERVER_SOFTWARE  Microsoft-IIS/5.0  
> SystemDrive  C:  
> SystemRoot  C:\WINNT  
> TEMP  C:\WINNT\TEMP  
> TMP  C:\WINNT\TEMP  
> USERPROFILE  C:\Documents and Settings\NetShowServices  
> windir  C:\WINNT  
> 
> 
> PHP Variables
> Variable Value 
> _REQUEST["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f 
> _COOKIE["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f 
> _SERVER["ALLUSERSPROFILE"] C:\\Documents and Settings\\All Users 
> _SERVER["CommonProgramFiles"] C:\\Program Files\\Common Files 
> _SERVER["COMPUTERNAME"] WS02TC07927 
> _SERVER["ComSpec"] C:\\WINNT\\system32\\cmd.exe 
> _SERVER["CONTENT_LENGTH"] 0 
> _SERVER["GATEWAY_INTERFACE"] CGI/1.1 
> _SERVER["HTTPS"] off 
> _SERVER["HTTP_ACCEPT"] */* 
> _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us 
> _SERVER["HTTP_CONNECTION"] Keep-Alive 
> _SERVER["HTTP_HOST"] opsup.telaurus.net 
> _SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; 
> Windows NT
> 5.1) 
> _SERVER["HTTP_COOKIE"] PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f 
> _SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate 
> _SERVER["INSTANCE_ID"] 3 
> _SERVER["LOCAL_ADDR"] 10.16.1.21 
> _SERVER["NUMBER_OF_PROCESSORS"] 1 
> _SERVER["Os2LibPath"] C:\\WINNT\\system32\\os2\\dll; 
> _SERVER["OS"] Windows_NT 
> _SERVER["Path"] 
> C:\\WINNT\\system32;C:\\WINNT;C:\\WINNT\\System32\\Wbem 
> _SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH 
> _SERVER["PATH_INFO"] /phpinfo.php 
> _SERVER["PATH_TRANSLATED"] C:\\Inetpub\\wwwOpSup\\phpinfo.php 
> _SERVER["PROCESSOR_ARCHITECTURE"] x86 
> _SERVER["PROCESSOR_IDENTIFIER"] x86 Family 6 Model 8 Stepping 10,
> GenuineIntel 
> _SERVER["PROCESSOR_LEVEL"] 6 
> _SERVER["PROCESSOR_REVISION"] 080a 
> _SERVER["ProgramFiles"] C:\\Program Files 
> _SERVER["REMOTE_ADDR"] 10.16.2.55 
> _SERVER["REMOTE_HOST"] 10.16.2.55 
> _SERVER["REQUEST_METHOD"] GET 
> _SERVER["SCRIPT_NAME"] /phpinfo.php 
> _SERVER["SERVER_NAME"] opsup.telaurus.net 
> _SERVER["SERVER_PORT"] 80 
> _SERVER["SERVER_PORT_SECURE"] 0 
> _SERVER["SERVER_PROTOCOL"] HTTP/1.1 
> _SERVER["SERVER_SOFTWARE"] Microsoft-IIS/5.0 
> _SERVER["SystemDrive"] C: 
> _SERVER["SystemRoot"] C:\\WINNT 
> _SERVER["TEMP"] C:\\WINNT\\TEMP 
> _SERVER["TMP"] C:\\WINNT\\TEMP 
> _SERVER["USERPROFILE"] C:\\Documents and Settings\\NetShowServices 
> _SERVER["windir"] C:\\WINNT 
> _SERVER

Re: [PHP] PH error: Parse error: parse error, unexpected $end

2004-01-29 Thread John W. Holmes
From: "Denham Eva" <[EMAIL PROTECTED]>
> Parse error: parse error, unexpected $end
> Please can someone help!

You need an editor that does source code highlighting. If you had that, you
would not have encountered this error because you'd have noticed the
unterminated string here

> $query = "insert into work
>
> values('".$category."','".$description."','".$requestor."');

Whenever you see that error, or get a parse error on the very last line of
the PHP script, it usually means you missed a quote or brace somewhere.

---John Holmes...

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



Re: [PHP] PH error: Parse error: parse error, unexpected $end

2004-01-29 Thread John Nichel
Denham Eva wrote:

 $query = "insert into work

values('".$category."','".$description."','".$requestor."');
You're missing a closing quote at the end of your query.

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

2004-01-29 Thread johanp



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

RE: [PHP] Fopen and streams

2004-01-29 Thread Mike Migurski
>Secondly, where is a good place to read on the standards and formats used
>by these different schemes.  In the fsockopen() func, I made some writes
>to 'GET / ' and 'HTTP 1.1' etc... After reading the script, I understand
>what these imply, but not the importance, also, what other commmands are
>available to me.  Does that all make sense?  I guess more simply put: How
>do I know what commands are availble to me in the different protocals.
>HTTP, FTP, UDP, etc...what if I wanted to get at the data through
>straight TCP, is that possible?

Most protocols are documented in RFC's, such as these:
http://www.w3.org/Protocols/rfc2616/rfc2616.html
http://ftp.ics.uci.edu/pub/ietf/http/rfc1945.html
http://www.ietf.org/rfc/rfc0959.txt
http://www.faqs.org/rfcs/rfc768.html
http://www.ibiblio.org/pub/docs/rfc/rfc793.txt

>Lastly, where should I go to read up on how to make my scripts run
>faster?  I haven't written anything to large, but I'm generalyy paranoid
>about overhead, esp in areas I probably don't need to be worried about.
>Silly questions I suppose, like, is it more efficient to echo one long
>string or echo parts of it on separate lines.  The latter is easier when
>creating tables and such, because I can comment out individual lines to
>hunt down bugs.  But does it make a difference in the runtime of the
>script?  Etc

Knuth's quote, "We should forget about small efficiencies, say about 97%
of the time:  premature optimization is the root of all evil", was
probably intended to refer to optimizations like those. I wouldn't worry
about them, especially if shaving a few milliseconds off your script is
going to make it a nightmare to debug or revisit.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



[PHP] Re: Zend Studio ESC key issue?

2004-01-29 Thread Eric Bolikowski
Hei Trevor

I have got exactly the same problem, and there doesn't seem to be any
solution to it...

What you could to, is to send a mail to Zend and ask them to implement a
feature that will allow us Zend Studio users to customize this.

Eric

"Trevor Gryffyn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
First, let me apologize for this not being a specific PHP question, but
I can't find the answer and I'm hoping someone else here has run into
this.  Maybe I'm just blind, blond or stupid today. :)

In Zend Studio (Zend Development Environment) for Windows (on Windows
2000 fyi), when I hit the ESC key, it hides my "Messages", "Debug" and
"Output" windows.  This might be nice sometimes, but I find myself
hitting ESC (sometimes for no rational reason) and it's driving me nuts
that it hides the three windows I WANT to see and not the "File Manager"
window, which I really don't use that much currently. Hah

Is there somewhere to customize this or is there another key that brings
them back quickly?   I prefer keyboard use to mouse use and would prefer
not to have these windows disappear in the first place, but if it were a
matter of hitting ESC to temporarily hide and hitting ESC again to bring
them back, that'd be acceptable.


I promise to post more directly PHP related messages later, just gotta
take care of this one project first.

Thanks in advance!

-Trevor Gryffyn

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



[PHP] Error fread() after switching Register Globals Off

2004-01-29 Thread Daniel Perez Clavero
Hi there,

I´m getting this error and I can´t find what the problem is..

Warning: fread(): supplied argument is not a valid stream resource in
c:\program files\apache group\apache\htdocs\dpc\modulos\mod_ins_doc.php on
line 13

I´ve got a form that calls a module to insert data. IT WAS WORKING before I
switched the Register Globals to Off value. I made the proper chages to
recieve variables, but i cannot make it work. Here is the code of the insert
module.



The code of the form is correct. This is the name of the input fields.

";
";
";

Any ideas?
Thank You.

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



RE: [PHP] random?

2004-01-29 Thread craig

> Maybe MySQL's RAND() function isn't very random.
>

>From the mysql manual:

RAND() is not meant to be a perfect random generator, but instead 
a fast way to generate ad hoc random numbers that will be portable 
between platforms for the same MySQL version. 

doesn't help, but at least you know you're not imagining things ;)

-Craig

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



Re: [PHP] Show Results one at a time ?

2004-01-29 Thread Brian Tully
on 1/29/04 7:50 AM, Dave Carrera at [EMAIL PROTECTED] wrote:

> Hi List,
> 
> I have a test function who's aim is to take an array an do something which
> each value of the array and show the result on screen one at a time.
> 
> --- Test Function Code ---
> 
> function TestFunc(){
> $cnt = array(1,2,3,4,5,6,7,8,9,10);
> $i=0;
> 
> while($i <=count($cnt)){
> set_time_limit(2);
> echo $cnt[$i].str_repeat(" ", 300) . "";;
> ob_flush();
> flush();
> $i++;
> }
> 
> --- End ---
> 
> This just shows the output after processing all of the function which is the
> behaviour of php as a server side engine, but after reading the manual I
> thought the combination of flush() and ob_flush() would do what I wanted,
> but I obviously got the wrong end of the stick which flush() and what is
> dose.
> 
> So I ask the list if there is a way to show success or fail results for each
> of the values of an array one at a time:
> 

i don' think there's a reliable way to do this since you're relying on the
browser to display these items as PHP prints them out. as someone else
pointed out some browsers don't render items as they load and instead wait
for all the page to load before rendering the page. this is especially true
of pages using tables.

perhaps a workaround would be to use a little DHTML (CSS & Javascript).

i don't have the exact code but i'm fairly confident it can be done. here's
the concept:

- when looping through each value place each in its own DIV with a unique
ID, i.e., result$cnt[$i]. All DIVs should be styled so that they are NOT
visible. (i.e., the page loads, all DIVs are loaded but are hidden). you can
do this through visibility = "hidden" or display = "none"

- create/find a Javascript show/hide layer script that also has a timer
function. since you've given each DIV it's own unique ID based upon the
$cnt[$i] value, you can reference these within the Javascript by doing a
similar loop. in the loop you'll identify each layer by it's unique ID and
change it's visibility = "visible" or display = "block". in between each
item in the loop you can add a pause (similar to what you were trying in the
PHP code).

hope this is clear enough and hope it helps.

regards,
brian

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



Re: [PHP] Error fread() after switching Register Globals Off

2004-01-29 Thread John W. Holmes
From: "Daniel Perez Clavero" <[EMAIL PROTECTED]>

> Warning: fread(): supplied argument is not a valid stream resource in
> c:\program files\apache group\apache\htdocs\dpc\modulos\mod_ins_doc.php on
> line 13
>
> I´ve got a form that calls a module to insert data. IT WAS WORKING before
I
> switched the Register Globals to Off value. I made the proper chages to
> recieve variables, but i cannot make it work. Here is the code of the
insert
> module.

Since register_globals is OFF, you need to use $_FILES. The uploaded data is
present in $_FILES, not $_POST.

http://us2.php.net/manual/en/features.file-upload.php

>  $dbhost="localhost";
> $dbusuario="user";
> $dbpassword="password";
> $db="database";
> $conexion = mysql_connect($dbhost,$dbusuario,$dbpassword);
> mysql_select_db($db,$conexion);
>
> $farchivo=$_POST['farchivo'];

$farchivo = $_FILES['farchivo']['tmp_name'];

for example...

> $binary = addslashes (fread(fopen($farchivo, "rb"), filesize($farchivo)));
>
> $nombre=$_POST['fnombre'];
> $descripcion=$_POST['fdescripcion'];
> $insert_data = "INSERT INTO
> documentos (id, nombre, descripcion, fichero, nomfichero, tamfichero,
> tipofichero)
> VALUES ('', '$nombre','$descripcion','$binary', '$farchivo_name',
> '$farchivo_size', '$farchivo_type')";
> mysql_query($insert_data,$conexion) or die("Couldn't insert data.");
> header("Location: ../index.php?sec=doc0");
> ?>
>
> The code of the form is correct. This is the name of the input fields.
>
>  CLASS=\"identificationfield\">";
>  CLASS=\"identificationfield\">";
>  CLASS=\"identificationfield\">";

---John Holmes...

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



RE: [PHP] Sessions not working.

2004-01-29 Thread Jeff McKeon
They are the same physical server using the same php.ini

Just different "logical" web servers set up in IIS5.  In otherwords,
each webserver on the system has it's own IP address.

-Original Message-
From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 9:19 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.


Random thought.. Did you check your PHP.INI on the 'bad' server to make
sure that it's configured the same as the 'good' server?

Some things to check:

Session.use_cookies = 1
Session.auto_start = 0  // This is the first one I'd check.  If you have
it set to =1 on the good server and aren't doing a session_start(), that
could do it I think

There are a bunch of other Session related parameters in PHP.INI..
Default timeout value.. If that's set too low, the session might
vaporize before you get a chance to see the info, etc.

Good luck!

-TG

> -Original Message-
> From: Jeff McKeon [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 28, 2004 7:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sessions not working.
> 
> 
> Pulling my hair out here.
> 
> I've got an IIS5 webserver running a php website just fine.
> 
> I created another web for a dev version of the first website.
>  Installed
> PHP ect...
> When I load up the old websites files on the new site sessions won't
> work on the new site.
> 
> For some reason on the new site's phpinfo.php page, there is no 
> HTTP_COOKIE variable set under the "environmental" section.
> 
> Also, under the PHP Variables section, there is no
> _REQUEST["PHPSESSID"]
> or _COOKIE["PHPSESSID"] variable.
> 
> What have I missed!???
> 
> Here is a section of the phpinfo() for both sites.
> 
> Good Site:
> 
> Environment
> Variable Value
> ALLUSERSPROFILE  C:\Documents and Settings\All Users  
> CommonProgramFiles  C:\Program Files\Common Files  
> COMPUTERNAME  WS02TC07927  
> ComSpec  C:\WINNT\system32\cmd.exe  
> CONTENT_LENGTH  0  
> GATEWAY_INTERFACE  CGI/1.1  
> HTTPS  off  
> HTTP_ACCEPT  */*  
> HTTP_ACCEPT_LANGUAGE  en-us  
> HTTP_CONNECTION  Keep-Alive  
> HTTP_HOST  opsup.telaurus.net  
> HTTP_USER_AGENT  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)  
> HTTP_COOKIE  PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f  
> HTTP_ACCEPT_ENCODING  gzip, deflate  
> INSTANCE_ID  3  
> LOCAL_ADDR  10.16.1.21  
> NUMBER_OF_PROCESSORS  1  
> Os2LibPath  C:\WINNT\system32\os2\dll;  
> OS  Windows_NT  
> Path  C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem  
> PATHEXT  .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH  
> PATH_INFO  /phpinfo.php  
> PATH_TRANSLATED  C:\Inetpub\wwwOpSup\phpinfo.php  
> PROCESSOR_ARCHITECTURE  x86  
> PROCESSOR_IDENTIFIER  x86 Family 6 Model 8 Stepping 10, GenuineIntel  
> PROCESSOR_LEVEL  6  
> PROCESSOR_REVISION  080a  
> ProgramFiles  C:\Program Files  
> REMOTE_ADDR  10.16.2.55  
> REMOTE_HOST  10.16.2.55  
> REQUEST_METHOD  GET  
> SCRIPT_NAME  /phpinfo.php  
> SERVER_NAME  opsup.telaurus.net  
> SERVER_PORT  80  
> SERVER_PORT_SECURE  0  
> SERVER_PROTOCOL  HTTP/1.1  
> SERVER_SOFTWARE  Microsoft-IIS/5.0  
> SystemDrive  C:  
> SystemRoot  C:\WINNT  
> TEMP  C:\WINNT\TEMP  
> TMP  C:\WINNT\TEMP  
> USERPROFILE  C:\Documents and Settings\NetShowServices  
> windir  C:\WINNT  
> 
> 
> PHP Variables
> Variable Value
> _REQUEST["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f 
> _COOKIE["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f 
> _SERVER["ALLUSERSPROFILE"] C:\\Documents and Settings\\All Users 
> _SERVER["CommonProgramFiles"] C:\\Program Files\\Common Files 
> _SERVER["COMPUTERNAME"] WS02TC07927 
> _SERVER["ComSpec"] C:\\WINNT\\system32\\cmd.exe 
> _SERVER["CONTENT_LENGTH"] 0 
> _SERVER["GATEWAY_INTERFACE"] CGI/1.1 
> _SERVER["HTTPS"] off 
> _SERVER["HTTP_ACCEPT"] */* 
> _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us 
> _SERVER["HTTP_CONNECTION"] Keep-Alive 
> _SERVER["HTTP_HOST"] opsup.telaurus.net 
> _SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; 
> Windows NT
> 5.1) 
> _SERVER["HTTP_COOKIE"] PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f 
> _SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate 
> _SERVER["INSTANCE_ID"] 3 
> _SERVER["LOCAL_ADDR"] 10.16.1.21 
> _SERVER["NUMBER_OF_PROCESSORS"] 1 
> _SERVER["Os2LibPath"] C:\\WINNT\\system32\\os2\\dll; 
> _SERVER["OS"] Windows_NT 
> _SERVER["Path"] 
> C:\\WINNT\\system32;C:\\WINNT;C:\\WINNT\\System32\\Wbem 
> _SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH 
> _SERVER["PATH_INFO"] /phpinfo.php 
> _SERVER["PATH_TRANSLATED"] C:\\Inetpub\\wwwOpSup\\phpinfo.php 
> _SERVER["PROCESSOR_ARCHITECTURE"] x86 
> _SERVER["PROCESSOR_IDENTIFIER"] x86 Family 6 Model 8 Stepping 10,
> GenuineIntel 
> _SERVER["PROCESSOR_LEVEL"] 6 
> _SERVER["PROCESSOR_REVISION"] 080a 
> _SERVER["ProgramFiles"] C:\\Program Files 
> _SERVER["REMOTE_ADDR"] 10.16.2.55 
> _SERVER["REMOTE_HOST"] 10.16.2.55 
> _SERVER["REQUEST_METHOD"] GET 
> _SERVER["SCRIPT_NAME"] /phpinfo.php 
> _SERVER["SERVER_NAME"] opsup.telaurus.net 
> _SERVER["SERVER_PORT"] 80 
>

[PHP] Error fread() after switching Register Globals Off

2004-01-29 Thread DPCMA Metalito
Hi there,

I´m getting this error and I can´t find what the problem is..

Warning: fread(): supplied argument is not a valid stream resource in 
c:\program files\apache group\apache\htdocs\dpc\modulos\mod_ins_doc.php on 
line 13

I´ve got a form that calls a module to insert data. IT WAS WORKING before I 
switched the Register Globals to Off value. I made the proper chages to 
recieve variables, but i cannot make it work. Here is the code of the insert 
module.


$farchivo=$_POST['farchivo'];

$binary = addslashes (fread(fopen($farchivo, "rb"), filesize($farchivo)));

$nombre=$_POST['fnombre'];
$descripcion=$_POST['fdescripcion'];
$insert_data = "INSERT INTO
documentos (id, nombre, descripcion, fichero, nomfichero, tamfichero, 
tipofichero)
VALUES ('', '$nombre','$descripcion','$binary', '$farchivo_name', 
'$farchivo_size', '$farchivo_type')";
mysql_query($insert_data,$conexion) or die("Couldn't insert data.");
header("Location: ../index.php?sec=doc0");
?>

The code of the form is correct. This is the name of the input fields.

";
";
";

Any ideas?
Thank You.
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


Re: [PHP] Spell checker in PHP

2004-01-29 Thread Alex King
Justin,

I don't know what version of Word you have, but XP seems to do fine with
correcting city names.

Alex

"Justin French" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Saturday, January 10, 2004, at 06:57  AM, Robin Kopetzky wrote:
>
> > Good afternoon!
> >
> > I know aspell and pspell are available but pspell won't work in my
> > Windows
> > environment. Does anyone know how to tie into Word's spell checker
> > using php
> > or another spell check option? What I need is a way to check spelling
> > on
> > city/state names and select the most appropriate if the user mangles
> > the
> > words.
>
> U, does is Word actually capable of City/State names?  To the best
> of my knowledge (I don't use Word), Word checks against a dictionary
> (US/UK/AU English, etc)... I wouldn't think these dictionaries would
> extend as far as all City & State names applicable for that dictionary.
>   That's insane.
>
> Although technically, you *could* add them all to Word's dictionary.
>
> However, my point is, Spell-checking of City & State names isn't
> common, because it's too hard for the dictionaries to keep up with the
> list.
>
> So, if Word can't offer this feature, why would your web application
> need it?
>
>
> Also, given the global nature of the web, you'd have a LOT of data
> entry to do :)
>
>
> Justin French

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



[PHP] eregi_replace help needed

2004-01-29 Thread php4
Hi,

I want to locate patterns such as

12345678
1 23 45 67 89
1 2 34 567 890

and replace the pattern string with a new string.

I tried

$filter['message'] = eregi_replace("[0-9\s]{4,}",'', 
$filter['message']);

but it does not work on all the above examples.

Thanks for the assistance!

Nico

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



[PHP] HELP <> PLEASE PHP

2004-01-29 Thread Patrick
Hi,

I have an situation on my hands I have a form that I am stuck using PHP for
thanks to my friends choice of hosting company, I have no idea on how to
setup a form in PHP other than HTML or in Flash, I need some one any one
to give me some advice on this Posted layout it seems to work but not
really,
I managed to get it set up but for some reason when you hit Submit and an
error message goes off at the top the form is Reset. Other than that I am
not
sure I wrote all the code correctly.

Sorry About the long post

Any advice would be great.

www.mdycentrutionmtg.com/formtest.php

Formtest.php--





 
  Centurion Loan Form
 
 



   

 
  
   
Loan Form
Please fill in all the fields below to the
best of your knowledge if you have any questions please feel free to call me at 248-770-7518
 
   
   

 

 
   
  
 
 
  
   Borrower
  
  Co-Borrower
 
 
  
  
  
 
 
  First Name
  First Name
 
 
   MI 
   MI 
 
 
  Last Name
  Last Name
 
 
  
  
 
 
  
   S.S. #
  
  
   S.S. #
  
 
 
  
   
  
  
   
  
 
 
  Marital status
  Marital status
 
 
  
Single
Married
Divorced
In the process of
devorce
   
  
Single
Married
Divorced
In the process of
devorce
   
 
 
  Home phone number
  Home phone number
 
 
  
  
 
 
  Present address
  Present address
 
 
  
  
 
 
  City
  City
 
 
   State 
   State 
 
 
  Zip code
  Zip code
 
 
   Apt. # 
   Apt. # 
 
 
  Time at this address
  Time at this address
 
 
   Months  Years
   Months  Years
 
 
  Type of residence
  Type of residence
 
 
  
Rent
Own
   
  
Rent
Own
   
 
 
  Amount of monthly payment
  Amount of monthly payment
 
 
  $
  $
 
 
  Present employer
  Present employer
 
 
  
  
 
 
  How long with this employer
  How long with this employer
 
 
   Months 
Years
   Months 
Years
 
 
  Rate of pay
  Rate of pay
 
 
  $ / 
Hour
Week
Month
   
  $ / 
Hour
Week
Month
   
 
 
  Average number of hours / week
  Number of hours / week
 
 
  
  
 
 
  Work phone number
  Work phone number
 
 
  
  
 
 
  Description of two year work history if less than two
years with present employer
 
 
  
 
 
  Description of any other income recieved on a monthly
basis
 
 
  
 
 
  
   Amount of cash available to put down towards a new home
  
 
 
  $
 
 
  Maximum payment you are comfortable with for a new
home
 
 
  $ /Month
 
 
  
   
Please Pick the type of loan your applying for

 Mortgage Loan
 Refinancing



   
  
 

 
  
  Loan Application
  
 



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



RE: [PHP] eregi_replace help needed

2004-01-29 Thread craig


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: January 29, 2004 8:53 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] eregi_replace help needed
> 
> 
> Hi,
> 
> I want to locate patterns such as
> 
> 12345678
> 1 23 45 67 89
> 1 2 34 567 890
> 
> and replace the pattern string with a new string.
> 
> I tried
> 
> $filter['message'] = eregi_replace("[0-9\s]{4,}",' replaced>', $filter['message']);
> 
> but it does not work on all the above examples.
> 
> Thanks for the assistance!
> 
> Nico
> 

off the top of my head, I don't think '\s' is valid in a character
class, so just use ' ' instead 

try  eregi_replace("[0-9 ]{4,}"

-Craig

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



RE: [PHP] eregi_replace help needed

2004-01-29 Thread php4
Hi,

the "off the top of your head" was perfect.  It is contrary to everything I've read on 
this, but it did the trick.

>off the top of my head, I don't think '\s' is valid in a character
>class, so just use ' ' instead

>try  eregi_replace("[0-9 ]{4,}"

>-Craig

Thanks

Nico

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



RE: [PHP] random?

2004-01-29 Thread Chris
Hi Rob,

Thanks for the ideaI think it is probably a better way to go also.
Hers what I came up iwth...and the rest of the code pertaining to the goal.

I'm sure that I'm, overlooking something simple here, but I can't seem to
make this work...


srand ((double) microtime() * 100);
$r = mysql_query('select count(*) as cnt from agentdb');
$cnt = mysql_result($r, 0, 0);
mysql_free_result($r);
$rnd = rand(1, $cnt);
$sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
(agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and
agentdb.agent_id <> 333)) LIMIT $rnd, 1";
 $results= mysql_query($sql);
 $agent=mysql_fetch_array($results);
 $agent_ref = $agent['agent_ref'];
 $agent_id =  $agent['agent_id'];
 $agent_first = $agent['agent_first'];
 $agent_last = $agent['agent_last'];
 $agent_first = rawurldecode($agent_first);
 $agent_last = rawurldecode($agent_last);

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



RE: [PHP] Storing MS Word documents

2004-01-29 Thread jon roig
For whatever it's worth, the standard advice when it comes to this stuff
is that it's always better/faster to store the binary data in the
filesystem and just keep a pointer to it in the db to keep track of
metadata and whatnot.

Dunno if that's true, of course, but it might be worth keeping in mind.

-- jon

---
jon roig
web developer
email: [EMAIL PROTECTED]
phone: 888.230.7557


-Original Message-
From: bob pilly [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 5:26 AM
To: Stuart
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Storing MS Word documents


Have sorted this out now. Theres a bit about storing
binary data in the mssql docs:

http://uk.php.net/function.mssql-query

Just in case anyone wanted to know.

 --- Stuart <[EMAIL PROTECTED]> wrote: > bob
pilly wrote:
> > It seems to me that the addslashes isnt working
> and
> > the  query is failing because of this? Has anyone
> seen
> > this before or know what i am doing wrong? Ive
> been on
> > this for ages and are not getting anywhere..
> Thanks
> > for any help in advance!
> 
> You don't escape single quotes with MSSQL you repeat
> them. Try this
> instead...
> 
> $data = str_replace("'", "''", $filecontent);
> 
> --
> Stuart
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>  


BT Yahoo! Broadband - Free modem offer, sign up online today and save
£80 http://btyahoo.yahoo.co.uk

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.564 / Virus Database: 356 - Release Date: 1/19/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

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



[PHP] phpCollab on shared server?

2004-01-29 Thread Marc A. Garrett
Has anyone installed phpCollab on a shared server? I have a php account with
MediaTemple and was hoping to find a few pointers.
-- 
Marc A. Garrett
since1968.com

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



Re: [PHP] HELP <> PLEASE PHP

2004-01-29 Thread John Nichel
Hello Patrick.  Where to start, where to start

Patrick wrote:
Hi,

I have an situation on my hands I have a form that I am stuck using PHP for
thanks to my friends choice of hosting company, I have no idea on how to
setup a form in PHP other than HTML or in Flash, I need some one any one
to give me some advice on this Posted layout it seems to work but not
really,
I managed to get it set up but for some reason when you hit Submit and an
error message goes off at the top the form is Reset. Other than that I am
not
sure I wrote all the code correctly.
Sorry About the long post

Any advice would be great.

www.mdycentrutionmtg.com/formtest.php

Formtest.php--

Chances are, all your variables here are going to be empty, since I'm 
sure the hosting company has register_globals turned off.  You can use 
the global _POST array...

$_POST['firstname']...$_POST['lastname']...etc, etc

Also, for your 'error' messages, a, well, I would

if ( ! isset ( $_POST['firstname'] ) ) {
$message .= "Please enter your first name.\n";
}
Get rid of the 'else's, and use ".=" when setting your message value so 
that if multiple items are not filled out, you won't be constantly 
overwriting the error message.

if ($submit) {

if ($firstname <= "")
$message = "Please enter your first name.";
else
if ($lastname <= "")
$message = "Please enter your last name.";
else
if ($homephone <= "")
$message = "Please enter your home phone number.";
else
if ($address <= "")
$message = "Please enter your current home address.";
else
if ($city <= "")
$message = "Please enter which city you currently live in.";
else
if ($state <= "")
$message = "Please enter which state you currently live in.";
else
if ($zip <= "")
$message = "Please enter your zip code.";
else
if ($monthlypayment <= "")
$message = "Please enter the amount of your monthly payment.";
else
if ($presentemployer <= "")
$message = "Please enter the name of your present employer.";
else
if ($rateofpay <= "")
$message = "Please enter your rate of pay.";
else
if ($hoursperweek <= "")
$message = "Please enter the average amount of hours worked in a week.";
else
if ($deposit <= "")
$message = "Please enter the amount of your deposit.";
else
if ($maxpayment <= "")
$message = "Please enter an average payment your comfortable with.";
if ($message)
   echo ($yo);
Don't know what $yo is here...I'm guessing that you're testing something?

However, 'mail()' below here is going to crap out, and give you an 
error.  Look here

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

else {
   mail("[EMAIL PROTECTED]",
   "Form Results",
   "First Name $firstname",
   "Middle Initial $middleinital",
   "Last Name $lastname",
   "Social Security Number $ss",
   "Marital Status $maritalstatus",
   "Home Phone $homephone",
   "Address $address",
   "City $city",
   "State $state",
   "Zip $zip",
   "Apt Number $apt",
   "Time at address $monthsataddress Months $yearsataddress Years",
   "Type of residence $typeofres",
   "Monthly Payment $monthlypayment",
   "Current Employer $presentemployer",
   "Time with Employer $monthswithemployer Months $yearswithemployer Years",
   "Rate of Pay $rateofpay Dollars per $rateofpayper",
   "Hours per week $hoursperweek",
   "Work Phone $workphone",
   "Work History $workhistory",
   "Other Income $otherincome",
   "Deposit $deposit",
   "Maximum Payment $maxpayment",
   "Type of Loan $typeofloan",
   "Co First Name $cofirstname",
   "Co Middle Initial $comiddleinital",
   "Co Last Name $colastname",
   "Co Social Security Number $coss",
   "Co Marital Status $comaritalstatus",
   "Co Home Phone $cohomephone",
   "Co Address $coaddress",
   "Co City $cocity",
   "Co State $costate",
   "Co Zip $cozip",
   "Co Apt Number $coapt",
   "Co Time at address $comonthsataddress Months $coyearsataddress Years",
   "Co Type of residence $cotypeofres",
   "Co Monthly Payment $comonthlypayment",
   "Co Current Employer $copresentemployer",
   "Co Time with Employer $comonthswithemployer Months $coyearswithemployer
Years",
   "Co Rate of Pay $corateofpay Dollars per $corateofpayper",
   "Co Hours per week $cohoursperweek",
   "Co Work Phone $coworkphone",
   "From: $firstname $lastname",
   "Subject: Online Form Application");
   $message = "Thank You.";
}
}
?>


--
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] STMP Configuration

2004-01-29 Thread Kaushan
Hi friends,

When I'm trying to use the mail() function I got the following error :

Failed to connect to mailserver at "localhost" port 25, verify your "SMTP"
and "smtp_port" setting in php.ini or use ini_set() .

I'm currently using PHP 2.0.0b1 and "localhost" (Apache) as the web server.

Do I have to install a seperate STMP server?

Thanks,

Kaushan

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



Re: [PHP] STMP Configuration

2004-01-29 Thread John Nichel
Kaushan wrote:

Hi friends,

When I'm trying to use the mail() function I got the following error :

Failed to connect to mailserver at "localhost" port 25, verify your "SMTP"
and "smtp_port" setting in php.ini or use ini_set() .
I'm currently using PHP 2.0.0b1 and "localhost" (Apache) as the web server.
PHP 2???

Do I have to install a seperate STMP server?
If you're trying to send mail thru localhost, localhost needs to have a 
running MTA (sendmail, qmail, etc), and that MTA needs to be configured 
to accept mail from localhost (default for all that I know), and relay 
for mail sent from localhost.

--
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] HELP <> PLEASE PHP

2004-01-29 Thread Jas
John Nichel wrote:
Hello Patrick.  Where to start, where to start

Patrick wrote:

Hi,

I have an situation on my hands I have a form that I am stuck using 
PHP for
thanks to my friends choice of hosting company, I have no idea on how to
setup a form in PHP other than HTML or in Flash, I need some one any one
to give me some advice on this Posted layout it seems to work but not
really,
I managed to get it set up but for some reason when you hit Submit and an
error message goes off at the top the form is Reset. Other than that I am
not
sure I wrote all the code correctly.

Sorry About the long post

Any advice would be great.

www.mdycentrutionmtg.com/formtest.php

Formtest.php--



Chances are, all your variables here are going to be empty, since I'm 
sure the hosting company has register_globals turned off.  You can use 
the global _POST array...

$_POST['firstname']...$_POST['lastname']...etc, etc

Also, for your 'error' messages, a, well, I would

if ( ! isset ( $_POST['firstname'] ) ) {
$message .= "Please enter your first name.\n";
}
Get rid of the 'else's, and use ".=" when setting your message value so 
that if multiple items are not filled out, you won't be constantly 
overwriting the error message.

if ($submit) {

or you could use this...

if(empty($firstname)) {
$message .= "
} elseif(empty($lastname)) {
$message .= "
You might have to use it like this though depending on if your using GET 
or POST

if(empty($_POST["$firstname"]) {
$message .= "
} elseif(empty($_POST["$lastname"]) {
$message .= "
Or you could just combine them all like so...

if((empty($_POST["$firstname"]) || (emtpy($_POST["$lastname"])) || ... {
$message = "nothing filled out...
HTH
Jas
if ($firstname <= "")
$message = "Please enter your first name.";
else
if ($lastname <= "")
$message = "Please enter your last name.";
else
if ($homephone <= "")
$message = "Please enter your home phone number.";
else
if ($address <= "")
$message = "Please enter your current home address.";
else
if ($city <= "")
$message = "Please enter which city you currently live in.";
else
if ($state <= "")
$message = "Please enter which state you currently live in.";
else
if ($zip <= "")
$message = "Please enter your zip code.";
else
if ($monthlypayment <= "")
$message = "Please enter the amount of your monthly payment.";
else
if ($presentemployer <= "")
$message = "Please enter the name of your present employer.";
else
if ($rateofpay <= "")
$message = "Please enter your rate of pay.";
else
if ($hoursperweek <= "")
$message = "Please enter the average amount of hours worked in a 
week.";
else
if ($deposit <= "")
$message = "Please enter the amount of your deposit.";
else
if ($maxpayment <= "")
$message = "Please enter an average payment your comfortable with.";

if ($message)
   echo ($yo);


Don't know what $yo is here...I'm guessing that you're testing something?

However, 'mail()' below here is going to crap out, and give you an 
error.  Look here

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

else {
   mail("[EMAIL PROTECTED]",
   "Form Results",
   "First Name $firstname",
   "Middle Initial $middleinital",
   "Last Name $lastname",
   "Social Security Number $ss",
   "Marital Status $maritalstatus",
   "Home Phone $homephone",
   "Address $address",
   "City $city",
   "State $state",
   "Zip $zip",
   "Apt Number $apt",
   "Time at address $monthsataddress Months $yearsataddress Years",
   "Type of residence $typeofres",
   "Monthly Payment $monthlypayment",
   "Current Employer $presentemployer",
   "Time with Employer $monthswithemployer Months $yearswithemployer 
Years",
   "Rate of Pay $rateofpay Dollars per $rateofpayper",
   "Hours per week $hoursperweek",
   "Work Phone $workphone",
   "Work History $workhistory",
   "Other Income $otherincome",
   "Deposit $deposit",
   "Maximum Payment $maxpayment",
   "Type of Loan $typeofloan",
   "Co First Name $cofirstname",
   "Co Middle Initial $comiddleinital",
   "Co Last Name $colastname",
   "Co Social Security Number $coss",
   "Co Marital Status $comaritalstatus",
   "Co Home Phone $cohomephone",
   "Co Address $coaddress",
   "Co City $cocity",
   "Co State $costate",
   "Co Zip $cozip",
   "Co Apt Number $coapt",
   "Co Time at address $comonthsataddress Months $coyearsataddress 
Years",
   "Co Type of residence $cotypeofres",
   "Co Monthly Payment $comonthlypayment",
   "Co Current Employer $copresentemployer",
   "Co Time with Employer $comonthswithemployer Months 
$coyearswithemployer
Years",
   "Co Rate of Pay $corateofpay Dollars per $corateofpayper",
   "Co Hours per week $cohoursperweek",
   "Co Work Phone $coworkphone",
   "From: $firstname $lastname",
   "Subject: Online Form Application");

   $message = "Thank You.";
}
}
?>


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

FW: [PHP] phpCollab on shared server?

2004-01-29 Thread Burhan Khalid
Burhan Khalid wrote:
> Marc A. Garrett wrote:
>> Has anyone installed phpCollab on a shared server? I have a php
>> account with MediaTemple and was hoping to find a few pointers. --
>> Marc A. Garrett since1968.com
> 
> I have installed it a few times on shared hosting accounts without
> any problems. Nothing exotic to do either. 
> 
> Email me offlist if you get stuck.

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



RE: [PHP] Sessions not working.

2004-01-29 Thread Jeff McKeon
Further info.

If I echo the session_id() onto the page I do get an id returned.  
So (correct me if I'm wrong) the session has started correctly with the
session_start() at the top of the page.

It just doesn't seem to save any of the session variables I set, or if
they are set, it can't retrieve them.

I get this error when trying to grab the $session['userid'] variable...

Notice: Undefined index: userid in C:\Inetpub\wwwOpSupDev\main.php on
line 37

-Original Message-
From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 9:19 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.


Random thought.. Did you check your PHP.INI on the 'bad' server to make
sure that it's configured the same as the 'good' server?

Some things to check:

Session.use_cookies = 1
Session.auto_start = 0  // This is the first one I'd check.  If you have
it set to =1 on the good server and aren't doing a session_start(), that
could do it I think

There are a bunch of other Session related parameters in PHP.INI..
Default timeout value.. If that's set too low, the session might
vaporize before you get a chance to see the info, etc.

Good luck!

-TG

> -Original Message-
> From: Jeff McKeon [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 28, 2004 7:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sessions not working.
> 
> 
> Pulling my hair out here.
> 
> I've got an IIS5 webserver running a php website just fine.
> 
> I created another web for a dev version of the first website.
>  Installed
> PHP ect...
> When I load up the old websites files on the new site sessions won't
> work on the new site.
> 
> For some reason on the new site's phpinfo.php page, there is no 
> HTTP_COOKIE variable set under the "environmental" section.
> 
> Also, under the PHP Variables section, there is no
> _REQUEST["PHPSESSID"]
> or _COOKIE["PHPSESSID"] variable.
> 
> What have I missed!???
> 
> Here is a section of the phpinfo() for both sites.
> 
> Good Site:
> 
> Environment
> Variable Value
> ALLUSERSPROFILE  C:\Documents and Settings\All Users  
> CommonProgramFiles  C:\Program Files\Common Files  
> COMPUTERNAME  WS02TC07927  
> ComSpec  C:\WINNT\system32\cmd.exe  
> CONTENT_LENGTH  0  
> GATEWAY_INTERFACE  CGI/1.1  
> HTTPS  off  
> HTTP_ACCEPT  */*  
> HTTP_ACCEPT_LANGUAGE  en-us  
> HTTP_CONNECTION  Keep-Alive  
> HTTP_HOST  opsup.telaurus.net  
> HTTP_USER_AGENT  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)  
> HTTP_COOKIE  PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f  
> HTTP_ACCEPT_ENCODING  gzip, deflate  
> INSTANCE_ID  3  
> LOCAL_ADDR  10.16.1.21  
> NUMBER_OF_PROCESSORS  1  
> Os2LibPath  C:\WINNT\system32\os2\dll;  
> OS  Windows_NT  
> Path  C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem  
> PATHEXT  .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH  
> PATH_INFO  /phpinfo.php  
> PATH_TRANSLATED  C:\Inetpub\wwwOpSup\phpinfo.php  
> PROCESSOR_ARCHITECTURE  x86  
> PROCESSOR_IDENTIFIER  x86 Family 6 Model 8 Stepping 10, GenuineIntel  
> PROCESSOR_LEVEL  6  
> PROCESSOR_REVISION  080a  
> ProgramFiles  C:\Program Files  
> REMOTE_ADDR  10.16.2.55  
> REMOTE_HOST  10.16.2.55  
> REQUEST_METHOD  GET  
> SCRIPT_NAME  /phpinfo.php  
> SERVER_NAME  opsup.telaurus.net  
> SERVER_PORT  80  
> SERVER_PORT_SECURE  0  
> SERVER_PROTOCOL  HTTP/1.1  
> SERVER_SOFTWARE  Microsoft-IIS/5.0  
> SystemDrive  C:  
> SystemRoot  C:\WINNT  
> TEMP  C:\WINNT\TEMP  
> TMP  C:\WINNT\TEMP  
> USERPROFILE  C:\Documents and Settings\NetShowServices  
> windir  C:\WINNT  
> 
> 
> PHP Variables
> Variable Value
> _REQUEST["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f 
> _COOKIE["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f 
> _SERVER["ALLUSERSPROFILE"] C:\\Documents and Settings\\All Users 
> _SERVER["CommonProgramFiles"] C:\\Program Files\\Common Files 
> _SERVER["COMPUTERNAME"] WS02TC07927 
> _SERVER["ComSpec"] C:\\WINNT\\system32\\cmd.exe 
> _SERVER["CONTENT_LENGTH"] 0 
> _SERVER["GATEWAY_INTERFACE"] CGI/1.1 
> _SERVER["HTTPS"] off 
> _SERVER["HTTP_ACCEPT"] */* 
> _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us 
> _SERVER["HTTP_CONNECTION"] Keep-Alive 
> _SERVER["HTTP_HOST"] opsup.telaurus.net 
> _SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; 
> Windows NT
> 5.1) 
> _SERVER["HTTP_COOKIE"] PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f 
> _SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate 
> _SERVER["INSTANCE_ID"] 3 
> _SERVER["LOCAL_ADDR"] 10.16.1.21 
> _SERVER["NUMBER_OF_PROCESSORS"] 1 
> _SERVER["Os2LibPath"] C:\\WINNT\\system32\\os2\\dll; 
> _SERVER["OS"] Windows_NT 
> _SERVER["Path"] 
> C:\\WINNT\\system32;C:\\WINNT;C:\\WINNT\\System32\\Wbem 
> _SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH 
> _SERVER["PATH_INFO"] /phpinfo.php 
> _SERVER["PATH_TRANSLATED"] C:\\Inetpub\\wwwOpSup\\phpinfo.php 
> _SERVER["PROCESSOR_ARCHITECTURE"] x86 
> _SERVER["PROCESSOR_IDENTIFIER"] x86 Family 6 Model 8 Stepping 10,
> GenuineIntel 
> _SERVER["PROCESSOR_LEVEL"] 6 
> _SERVER["PROCESSOR_REVISION"] 

Re: [PHP] HELP <> PLEASE PHP

2004-01-29 Thread memoimyself
Hello Patrick,

I have good news and even better news for you. The good news is that you can make all 
your form-related woes disappear in less than a day. The even better news is that 
everything you need to know in order to solve your problem can be found in one 
convenient location:

http://www.php.net/manual/en/index.php

You'll probably be able to fix your form just by reading sections I and II.

By the way, punctuation was invented for a reason, you know. You might want to 
consider using it.

Good luck,

Erik


On 29 Jan 2004 at 1:56, Patrick wrote:

> Hi,
> 
> I have an situation on my hands I have a form that I am stuck using PHP for
> thanks to my friends choice of hosting company, I have no idea on how to
> setup a form in PHP other than HTML or in Flash, I need some one any one
> to give me some advice on this Posted layout it seems to work but not
> really,
> I managed to get it set up but for some reason when you hit Submit and an
> error message goes off at the top the form is Reset. Other than that I am
> not
> sure I wrote all the code correctly.
> 
> Sorry About the long post
> 
> Any advice would be great.

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



Re: [PHP] Sessions not working.

2004-01-29 Thread Jas
Have you checked the %temporary% directory permissions to make sure IIS 
can write session data to the directory?  I had a hard time using php on 
IIS, so I installed linux... =)

Depending on the version of PHP installed you may need to call your 
session variables differently, example:

on PHP prior to 4.x
echo $HTTP_SESSION_VARS['variablename'];
4.x and later
echo $_SESSION['variablename'];
Double check the path in PHP.INI then look at the permissions of that 
folder and make sure the IIS user can write to it, I think it is 
IUSER_WIN2k or something.

HTH
Jas
Jeff McKeon wrote:

Further info.

If I echo the session_id() onto the page I do get an id returned.  
So (correct me if I'm wrong) the session has started correctly with the
session_start() at the top of the page.

It just doesn't seem to save any of the session variables I set, or if
they are set, it can't retrieve them.
I get this error when trying to grab the $session['userid'] variable...

Notice: Undefined index: userid in C:\Inetpub\wwwOpSupDev\main.php on
line 37
-Original Message-
From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 9:19 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.

Random thought.. Did you check your PHP.INI on the 'bad' server to make
sure that it's configured the same as the 'good' server?
Some things to check:

Session.use_cookies = 1
Session.auto_start = 0  // This is the first one I'd check.  If you have
it set to =1 on the good server and aren't doing a session_start(), that
could do it I think
There are a bunch of other Session related parameters in PHP.INI..
Default timeout value.. If that's set too low, the session might
vaporize before you get a chance to see the info, etc.
Good luck!

-TG


-Original Message-
From: Jeff McKeon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 7:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Sessions not working.
Pulling my hair out here.

I've got an IIS5 webserver running a php website just fine.

I created another web for a dev version of the first website.
Installed
PHP ect...
When I load up the old websites files on the new site sessions won't
work on the new site.
For some reason on the new site's phpinfo.php page, there is no 
HTTP_COOKIE variable set under the "environmental" section.

Also, under the PHP Variables section, there is no
_REQUEST["PHPSESSID"]
or _COOKIE["PHPSESSID"] variable.
What have I missed!???

Here is a section of the phpinfo() for both sites.

Good Site:

Environment
Variable Value
ALLUSERSPROFILE  C:\Documents and Settings\All Users  
CommonProgramFiles  C:\Program Files\Common Files  
COMPUTERNAME  WS02TC07927  
ComSpec  C:\WINNT\system32\cmd.exe  
CONTENT_LENGTH  0  
GATEWAY_INTERFACE  CGI/1.1  
HTTPS  off  
HTTP_ACCEPT  */*  
HTTP_ACCEPT_LANGUAGE  en-us  
HTTP_CONNECTION  Keep-Alive  
HTTP_HOST  opsup.telaurus.net  
HTTP_USER_AGENT  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)  
HTTP_COOKIE  PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f  
HTTP_ACCEPT_ENCODING  gzip, deflate  
INSTANCE_ID  3  
LOCAL_ADDR  10.16.1.21  
NUMBER_OF_PROCESSORS  1  
Os2LibPath  C:\WINNT\system32\os2\dll;  
OS  Windows_NT  
Path  C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem  
PATHEXT  .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH  
PATH_INFO  /phpinfo.php  
PATH_TRANSLATED  C:\Inetpub\wwwOpSup\phpinfo.php  
PROCESSOR_ARCHITECTURE  x86  
PROCESSOR_IDENTIFIER  x86 Family 6 Model 8 Stepping 10, GenuineIntel  
PROCESSOR_LEVEL  6  
PROCESSOR_REVISION  080a  
ProgramFiles  C:\Program Files  
REMOTE_ADDR  10.16.2.55  
REMOTE_HOST  10.16.2.55  
REQUEST_METHOD  GET  
SCRIPT_NAME  /phpinfo.php  
SERVER_NAME  opsup.telaurus.net  
SERVER_PORT  80  
SERVER_PORT_SECURE  0  
SERVER_PROTOCOL  HTTP/1.1  
SERVER_SOFTWARE  Microsoft-IIS/5.0  
SystemDrive  C:  
SystemRoot  C:\WINNT  
TEMP  C:\WINNT\TEMP  
TMP  C:\WINNT\TEMP  
USERPROFILE  C:\Documents and Settings\NetShowServices  
windir  C:\WINNT  

PHP Variables
Variable Value
_REQUEST["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f 
_COOKIE["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f 
_SERVER["ALLUSERSPROFILE"] C:\\Documents and Settings\\All Users 
_SERVER["CommonProgramFiles"] C:\\Program Files\\Common Files 
_SERVER["COMPUTERNAME"] WS02TC07927 
_SERVER["ComSpec"] C:\\WINNT\\system32\\cmd.exe 
_SERVER["CONTENT_LENGTH"] 0 
_SERVER["GATEWAY_INTERFACE"] CGI/1.1 
_SERVER["HTTPS"] off 
_SERVER["HTTP_ACCEPT"] */* 
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us 
_SERVER["HTTP_CONNECTION"] Keep-Alive 
_SERVER["HTTP_HOST"] opsup.telaurus.net 
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; 
Windows NT
5.1) 
_SERVER["HTTP_COOKIE"] PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f 
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate 
_SERVER["INSTANCE_ID"] 3 
_SERVER["LOCAL_ADDR"] 10.16.1.21 
_SERVER["NUMBER_OF_PROCESSORS"] 1 
_SERVER["Os2LibPath"] C:\\WINNT\\system32\\os2\\dll; 
_SERVER["OS"] Windows_NT 
_SERVER["Path"] 
C:\\WINNT\\system32;C:\\WINNT;C:\\WINNT\\System32

Re: [PHP] HELP <> PLEASE PHP

2004-01-29 Thread Jas
Man, you really are a card Erik.

Fellow manual reader,
Jas
[EMAIL PROTECTED] wrote:

Hello Patrick,

I have good news and even better news for you. The good news is that you can make all 
your form-related woes disappear in less than a day. The even better news is that 
everything you need to know in order to solve your problem can be found in one 
convenient location:

http://www.php.net/manual/en/index.php

You'll probably be able to fix your form just by reading sections I and II.

By the way, punctuation was invented for a reason, you know. You might want to 
consider using it.

Good luck,

Erik

On 29 Jan 2004 at 1:56, Patrick wrote:


Hi,

I have an situation on my hands I have a form that I am stuck using PHP for
thanks to my friends choice of hosting company, I have no idea on how to
setup a form in PHP other than HTML or in Flash, I need some one any one
to give me some advice on this Posted layout it seems to work but not
really,
I managed to get it set up but for some reason when you hit Submit and an
error message goes off at the top the form is Reset. Other than that I am
not
sure I wrote all the code correctly.
Sorry About the long post

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


[PHP] php to send emails using exim?

2004-01-29 Thread Jas
Not sure how to accomplish this, and yes I have read every post on 
Exim's website and scoured google for examples of sending emails from 
php using the exim mail server.

What I have done this far to try and get it to work...
changed php.in sendmail path to a symlink of sendmail which points to 
the current exim binary, and call the mail() function from php.

tried to do a system() to the exim binary as well as
exec("/path/to/exim -io -T, $msg")
All with no luck, could anyone give me an example of how to accomplish this?

Jas

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


[PHP] Encoding for uploaded files

2004-01-29 Thread Cesar Cordovez
Hi list!

How can I know the encoding for an uploaded file?

Thanks!

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


Re: [PHP] STMP Configuration

2004-01-29 Thread Sven
John Nichel schrieb:
Kaushan wrote:

Hi friends,

When I'm trying to use the mail() function I got the following error :

Failed to connect to mailserver at "localhost" port 25, verify your 
"SMTP"
and "smtp_port" setting in php.ini or use ini_set() .

I'm currently using PHP 2.0.0b1 and "localhost" (Apache) as the web 
server.


PHP 2???

Do I have to install a seperate STMP server?


If you're trying to send mail thru localhost, localhost needs to have a 
running MTA (sendmail, qmail, etc), and that MTA needs to be configured 
to accept mail from localhost (default for all that I know), and relay 
for mail sent from localhost.

... and if you not want to send from localhost, you can change your 
smtp-params in your php.ini.

hth SVEN

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


[PHP] shell_exec and accents

2004-01-29 Thread PHPDiscuss - PHP Newsgroups and mailing lists
Hi,

I'm using shell_exec to call a command that can return accented
characters.  Unfortunately the accented characters are being transformed
into other characters instead (for example, an acute e becomes a ',').

How can I get the real output?

I'm running on Windows 2000.  In the command prompt the command returns
the accents correctly.

Tim

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



[PHP] shell_exec and accents

2004-01-29 Thread PHPDiscuss - PHP Newsgroups and mailing lists
Hi,

I'm using shell_exec to call a command that can return accented
characters.  Unfortunately the accented characters are being transformed
into other characters instead (for example, an acute e becomes a ',').

How can I get the real output?

I'm running on Windows 2000.  In the command prompt the command returns
the accents correctly.

Tim

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



RE: [PHP] Encoding for uploaded files

2004-01-29 Thread craig
check out http://www.php.net/manual/en/features.file-upload.php,
it spells out the entire upload process

specifally, you want:
$_FILES['userfile']['type'] = The mime type of the file, if 
the browser provided this information. An example would 
be "image/gif". 

-Craig

> -Original Message-
> From: Cesar Cordovez [mailto:[EMAIL PROTECTED]
> Sent: January 29, 2004 10:35 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Encoding for uploaded files
> 
> 
> Hi list!
> 
> How can I know the encoding for an uploaded file?
> 
> Thanks!
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



[PHP] transactions

2004-01-29 Thread Diana Castillo
Is there anyway to do something similar to Transactions in mysql?

--
--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
  http://www.destinia.com

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



RE: [PHP] transactions

2004-01-29 Thread craig
 > Is there anyway to do something similar to Transactions in mysql?

Yes, use transactions

http://www.mysql.com/doc/en/Transactional_Commands.html

-Craig

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



Re: [PHP] Encoding for uploaded files

2004-01-29 Thread Cesar Cordovez
I don't know if you are right here, or maybe I don't understood 
correctly... the file type is actually the encoding of the file?  If a 
file type is text/plain, where is the encoding format?  ISO-8859-1?

Puzzled!

Cesar

craig wrote:

check out http://www.php.net/manual/en/features.file-upload.php,
it spells out the entire upload process
specifally, you want:
$_FILES['userfile']['type'] = The mime type of the file, if 
the browser provided this information. An example would 
be "image/gif". 

-Craig


-Original Message-
From: Cesar Cordovez [mailto:[EMAIL PROTECTED]
Sent: January 29, 2004 10:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Encoding for uploaded files
Hi list!

How can I know the encoding for an uploaded file?

Thanks!

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



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


Re: [PHP] Using unset with $_SESSION

2004-01-29 Thread Justin Patrin
However, I'm still mystified as to why unset($_SESSION) not only 
doesn't remove old data from the sesison file when the script exits, 
but prevents the new variable I create after that from being saved.

Perhaps $_SESSION as created by PHP is special and is tied to the 
session storage, whereas if it is destroyed with unset and then 
recreated that link is lost.  That would explain the behavior.
My guess is that what unset does in 'unlinks' the data from the 
variable, but it doesn't destroy it. The garbage collection routine in 
PHP destroys the values when it sees that they aren't connected to a 
variable. When you unset($_SESSION) you lose the name $_SESSION for that 
data (effectively killing youra bility to modify session vars), but the 
data is still kept tied to the session internally in PHP. When you do 
$_SESSION['newVar'] = 'newVal'; after that, you're creating an all-new 
variable called $_SESSION that has nothing to do with the actual session 
data.

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


RE: [PHP] Encoding for uploaded files

2004-01-29 Thread craig
> I don't know if you are right here, or maybe I don't understood 
> correctly... the file type is actually the encoding of the 
> file?  If a 
> file type is text/plain, where is the encoding format?  ISO-8859-1?
> 
> Puzzled!

sorry, I misunderstood the question.
I have no idea of how to get the actual encoding. =(

-Craig

> 
> Cesar
> 
> craig wrote:
> 
> > check out http://www.php.net/manual/en/features.file-upload.php,
> > it spells out the entire upload process
> > 
> > specifally, you want:
> > $_FILES['userfile']['type'] = The mime type of the file, if 
> > the browser provided this information. An example would 
> > be "image/gif". 
> > 
> > -Craig
> > 
> > 
> >>-Original Message-
> >>From: Cesar Cordovez [mailto:[EMAIL PROTECTED]
> >>Sent: January 29, 2004 10:35 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: [PHP] Encoding for uploaded files
> >>
> >>
> >>Hi list!
> >>
> >>How can I know the encoding for an uploaded file?
> >>
> >>Thanks!
> >>
> >>-- 
> >>PHP General Mailing List (http://www.php.net/)
> >>To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> > 
> > 
> 
> 

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



[PHP] Re: I need to unset BOTH $GLOBALS and $_SESSION vars?

2004-01-29 Thread Justin Patrin
Boot wrote:

Sorry for so many questions, thanks to all those who have helped.

I am finding that in order to completely unset some of my variables, I need
to use both unset($GLOBALS. and unset($_SESSION)
Does this make sense? Thanks!
This is probably because you have register_globals = on. Try changing 
the setting in your php.ini.

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


Re: [PHP] transactions

2004-01-29 Thread Lowell Allen
> Is there anyway to do something similar to Transactions in mysql?
> 

Yes -- 

--
Lowell Allen

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



Re: [PHP] transactions

2004-01-29 Thread John Nichel
Diana Castillo wrote:

Is there anyway to do something similar to Transactions in mysql?

Maybe the transaction section of the MySQL manual will help you out?

http://www.mysql.com/doc/en/Transactional_Commands.html

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


Re: [PHP] eregi_replace help needed

2004-01-29 Thread memoimyself
Hi Nico,

On 29 Jan 2004 at 17:52, [EMAIL PROTECTED] wrote:

> I want to locate patterns such as
> 
> 12345678
> 1 23 45 67 89
> 1 2 34 567 890
> 
> and replace the pattern string with a new string.
> 
> I tried
> 
> $filter['message'] = eregi_replace("[0-9\s]{4,}",'', 
> $filter['message']);

Use preg_replace() with the "i" pattern modifier instead of eregi_replace(), e.g.

preg_replace('/[\d\s]{4,}/i', '', $string)

Works like a charm.

Cheers,

Erik

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



RE: [PHP] Encoding for uploaded files

2004-01-29 Thread memoimyself
On 29 Jan 2004 at 10:47, craig wrote:

> specifally, you want: $_FILES['userfile']['type'] = The mime type of
> the file, if the browser provided this information. An example would
> be "image/gif". 

That's basically it and will work for common file types. However, it's the user's 
browser, 
not PHP, that identifies the MIME type of the file and sends this information along 
with 
the file. This means, first, that some browsers will send you the information (or the 
*correct*) information while others may not, and, second, that some file types will 
not be 
recognized by the user's browser and the file type available to PHP will be an empty 
string. So, as you can see, you can't really rely on this kind of information for 
anything 
critical to your application.

Cheers,

Erik

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



[PHP] Re: shell_exec and accents

2004-01-29 Thread DvDmanDT
As I said somewhere else about an hour ago, use like Iconv or something like
that.. It's caused by different charsets.. Chances are quite big you want to
use iso-8859-1, but the shell command uses something else..

-- 
// DvDmanDT
MSN: dvdmandt?hotmail.com
Mail: dvdmandt?telia.com
"Phpdiscuss - Php Newsgroups And Mailing Lists" <[EMAIL PROTECTED]> skrev
i meddelandet news:[EMAIL PROTECTED]
> Hi,
>
> I'm using shell_exec to call a command that can return accented
> characters.  Unfortunately the accented characters are being transformed
> into other characters instead (for example, an acute e becomes a ',').
>
> How can I get the real output?
>
> I'm running on Windows 2000.  In the command prompt the command returns
> the accents correctly.
>
> Tim

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



RE: [PHP] Sessions not working.

2004-01-29 Thread Jeff McKeon
Ok, there seems to be some confusion about my setup so here it is
again..

I have 1 physical server runing win2k server with IIS-5

I have 4 virtual web servers configured in IIS-5, each with it's own IP
address.

Site1,Site2,Site1DEV,Site2DEV

All using the same php.ini and all set up identically in IIS (as far as
I can tell).

Site1 has no problems saving or passing $_session[] variables between
pages.

Site1DEV, currently and exact copy of Site1, will not pass $_session[]
variables between pages.



Session_test.php

";
echo "PHP Session Is Set!";
echo "The session is set! The PHPSESSID is: $sid Text = $text
and userid = $userid";
echo "link";
echo "";
}
else
{
echo "";
echo "PHP Session Is NOT Set!";
echo "The session is NOT set! Check your server configuration
or version.";
echo "";
}
?>

Session_test2.php





  










On Site1 this works fine.  You get the sessionID and a link to
session_test2.php.  When you follow the link, session_test2.php displays
the contents of the $_SESSION['user'] variable.

On Site1DEV however, you see the sessionID on session_test.php and the
$_SESSION['user'] variable, but when you follow the link to
session_test2.php, the contents of the $_SESSION['user'] are blank.

What could be missing here in my server setup?

Thanks,

jeff

-Original Message-
From: Jeff McKeon 
Sent: Thursday, January 29, 2004 11:49 AM
To: Gryffyn, Trevor; [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.


Further info.

If I echo the session_id() onto the page I do get an id returned.  
So (correct me if I'm wrong) the session has started correctly with the
session_start() at the top of the page.

It just doesn't seem to save any of the session variables I set, or if
they are set, it can't retrieve them.

I get this error when trying to grab the $session['userid'] variable...

Notice: Undefined index: userid in C:\Inetpub\wwwOpSupDev\main.php on
line 37

-Original Message-
From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 9:19 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.


Random thought.. Did you check your PHP.INI on the 'bad' server to make
sure that it's configured the same as the 'good' server?

Some things to check:

Session.use_cookies = 1
Session.auto_start = 0  // This is the first one I'd check.  If you have
it set to =1 on the good server and aren't doing a session_start(), that
could do it I think

There are a bunch of other Session related parameters in PHP.INI..
Default timeout value.. If that's set too low, the session might
vaporize before you get a chance to see the info, etc.

Good luck!

-TG

> -Original Message-
> From: Jeff McKeon [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 28, 2004 7:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sessions not working.
> 
> 
> Pulling my hair out here.
> 
> I've got an IIS5 webserver running a php website just fine.
> 
> I created another web for a dev version of the first website.  
> Installed PHP ect...
> When I load up the old websites files on the new site sessions won't
> work on the new site.
> 
> For some reason on the new site's phpinfo.php page, there is no
> HTTP_COOKIE variable set under the "environmental" section.
> 
> Also, under the PHP Variables section, there is no 
> _REQUEST["PHPSESSID"] or _COOKIE["PHPSESSID"] variable.
> 
> What have I missed!???
> 
> Here is a section of the phpinfo() for both sites.
> 
> Good Site:
> 
> Environment
> Variable Value
> ALLUSERSPROFILE  C:\Documents and Settings\All Users
> CommonProgramFiles  C:\Program Files\Common Files  
> COMPUTERNAME  WS02TC07927  
> ComSpec  C:\WINNT\system32\cmd.exe  
> CONTENT_LENGTH  0  
> GATEWAY_INTERFACE  CGI/1.1  
> HTTPS  off  
> HTTP_ACCEPT  */*  
> HTTP_ACCEPT_LANGUAGE  en-us  
> HTTP_CONNECTION  Keep-Alive  
> HTTP_HOST  opsup.telaurus.net  
> HTTP_USER_AGENT  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)  
> HTTP_COOKIE  PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f  
> HTTP_ACCEPT_ENCODING  gzip, deflate  
> INSTANCE_ID  3  
> LOCAL_ADDR  10.16.1.21  
> NUMBER_OF_PROCESSORS  1  
> Os2LibPath  C:\WINNT\system32\os2\dll;  
> OS  Windows_NT  
> Path  C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem  
> PATHEXT  .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH  
> PATH_INFO  /phpinfo.php  
> PATH_TRANSLATED  C:\Inetpub\wwwOpSup\phpinfo.php  
> PROCESSOR_ARCHITECTURE  x86  
> PROCESSOR_IDENTIFIER  x86 Family 6 Model 8 Stepping 10, GenuineIntel  
> PROCESSOR_LEVEL  6  
> PROCESSOR_REVISION  080a  
> ProgramFiles  C:\Program Files  
> REMOTE_ADDR  10.16.2.55  
> REMOTE_HOST  10.16.2.55  
> REQUEST_METHOD  GET  
> SCRIPT_NAME  /phpinfo.php  
> SERVER_NAME  opsup.telaurus.net  
> SERVER_PORT  80  
> SERVER_PORT_SECURE  0  
> SERVER_PROTOCOL  HTTP/1.1  
> SERVER_SOFTWARE  Microsoft-IIS/5.0  
> SystemDrive  C:  
> SystemRoot  C:\WINNT  
> TEMP  C:\WINNT\TEMP  
> TMP  C:\WINNT\TEMP  
> USERPROFILE  C:\Documents and Settings\NetShowServices  
> windir  C:\WINNT  
> 

RE: [PHP] Spell checker in PHP

2004-01-29 Thread Gryffyn, Trevor
There are a lot of words in the spelling checking in Microsoft products
that isn't part of what you'd consider a standard 'dictionary', like
city names and such.

I think for spell checking, using the internal spell check in Word would
be best, but if you ever decided to work on Word<->PHP integration, look
into COM.

I havn't played around with it a lot, but someone at my work doubted I
could use PHP to control Microsoft MapPoint.  I got just far enough to
prove them wrong before getting busy.

$mappoint = new COM("mappoint.application") or die("Unable to
instanciate mappoint");
print "Loaded mappoint, version {$mappoint->Version}\n";

$map = new COM("mappoint.map") or die ("Unable to instanciate map");
$map = $mappoint->NewMap  or die ("Unable to NewMap");
$map->Name = "Test"  or die ("Unable to Name");;
$mappoint->Visible = 1;

You should be able to do similar things with almost all the latest
Microsoft applications, even if they don't have an obvious VBA editor
built in like Access and Excel do.

-TG

> -Original Message-
> From: Alex King [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 29, 2004 1:52 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Spell checker in PHP
> 
> 
> Justin,
> 
> I don't know what version of Word you have, but XP seems to 
> do fine with
> correcting city names.
> 
> Alex
> 
> "Justin French" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On Saturday, January 10, 2004, at 06:57  AM, Robin Kopetzky wrote:
> >
> > > Good afternoon!
> > >
> > > I know aspell and pspell are available but pspell won't work in my
> > > Windows
> > > environment. Does anyone know how to tie into Word's spell checker
> > > using php
> > > or another spell check option? What I need is a way to 
> check spelling
> > > on
> > > city/state names and select the most appropriate if the 
> user mangles
> > > the
> > > words.
> >
> > U, does is Word actually capable of City/State names?  
> To the best
> > of my knowledge (I don't use Word), Word checks against a dictionary
> > (US/UK/AU English, etc)... I wouldn't think these dictionaries would
> > extend as far as all City & State names applicable for that 
> dictionary.
> >   That's insane.
> >
> > Although technically, you *could* add them all to Word's dictionary.
> >
> > However, my point is, Spell-checking of City & State names isn't
> > common, because it's too hard for the dictionaries to keep 
> up with the
> > list.
> >
> > So, if Word can't offer this feature, why would your web application
> > need it?
> >
> >
> > Also, given the global nature of the web, you'd have a LOT of data
> > entry to do :)
> >
> >
> > Justin French

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



RE: [PHP] Integration between ASP & PHP.

2004-01-29 Thread Gryffyn, Trevor
Define "integrate"?

Using both ASP and PHP within the same physical file/script like:




<%
Aspcodehere
%?



??

...or going from ASP pages to PHP pages?
That is, "Default.asp" calls "menu.php" or something like that?


In the first case, I'm not sure if it's possible since the web server
passes the script to an interpreter based on what kinda of file it is.
.ASP and .ASPX are going to get sent to an ASP interpreter and .PHP, etc
are going to get sent to a PHP interpreter.

Not sure if you can get it to do both in the same file without some
tricky work.

Good luck though!  I'm curious to see if anyone knows of a way, but I'm
not sure I'd ever want to mix code like that.

-TG



> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 29, 2004 3:19 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Integration between ASP & PHP.
> Importance: High
> 
> 
> Hi all,
> is possible to integrate script in ASP with script in PHP?
> How can I do this?
> All helps are precious.
> Best regards.
> 

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



RE: [PHP] index page not running and other woes (0t?)

2004-01-29 Thread Gryffyn, Trevor
I'd check the permissions of your files as well as any .htaccess
settings you may need to set allowances on the files and folders
involved.

Also check your 'default document' name in your configuration and make
sure that it's looking for "index.html" at all.  Although that wouldn't
affect it if you implicitly spelled out "http://ipnumber/index.html";.
That sounds more like a permissions issue.

That should be in conf/httpd.conf for Apache if I remember right.  And
again, check to see if you have a .htaccess file or NEED one in the
folder(s) in question.

-TG

> -Original Message-
> From: Ryan A [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 28, 2004 11:11 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] index page not running and other woes (0t?)
> 
> 
> Hi,
> I think this is a bit off topic, but i'm sure some of you guys must be
> running ensim so might be able to help me.
> 
> We reciently took a dedicated server to work with, it came with ensim
> installed, its a Linux machine P4 2.6 running Apache.
> 
> Problem:
> 1)As I go to the IP address assigned to our box, it rolls out 
> the ensim
> login screen instead! it does not run the index.html page
> 2)when i put a phpinfo.php page there, and call that like so
> http://ipnumber/phpinfo.php it runs perfectly, but after that i made a
> folder "members" and tried calling that 
> http://ipnumber/members/ it gives me
> a page not found...
> i 
> even tried calling the index file like so: 
> http://ipnumber/index.html and
> it gives me a page not 
> found...
> 
> whats wrong? and what setting do i have to change?
> 
> Thanks,
> -Ryan
> 
> -- 
> 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] Sessions not working.

2004-01-29 Thread Jeff McKeon
Figured it out, I think.

PHP doesn't like the underscore in my website name.

http://site_dev.foo.com/ doesn't work but
http://192.168.2.50/ does.

If I rename the site in DNS to siteDEV.foo.com then it works fine.

Any ideas why?

-Original Message-
From: Jeff McKeon 
Sent: Thursday, January 29, 2004 2:48 PM
To: Jeff McKeon; Gryffyn, Trevor; [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.


Ok, there seems to be some confusion about my setup so here it is
again..

I have 1 physical server runing win2k server with IIS-5

I have 4 virtual web servers configured in IIS-5, each with it's own IP
address.

Site1,Site2,Site1DEV,Site2DEV

All using the same php.ini and all set up identically in IIS (as far as
I can tell).

Site1 has no problems saving or passing $_session[] variables between
pages.

Site1DEV, currently and exact copy of Site1, will not pass $_session[]
variables between pages.



Session_test.php

";
echo "PHP Session Is Set!";
echo "The session is set! The PHPSESSID is: $sid Text = $text
and userid = $userid"; echo "link";
echo "";
}
else
{
echo "";
echo "PHP Session Is NOT Set!"; echo
"The session is NOT set! Check your server configuration or
version."; echo ""; } ?>

Session_test2.php





  










On Site1 this works fine.  You get the sessionID and a link to
session_test2.php.  When you follow the link, session_test2.php displays
the contents of the $_SESSION['user'] variable.

On Site1DEV however, you see the sessionID on session_test.php and the
$_SESSION['user'] variable, but when you follow the link to
session_test2.php, the contents of the $_SESSION['user'] are blank.

What could be missing here in my server setup?

Thanks,

jeff

-Original Message-
From: Jeff McKeon 
Sent: Thursday, January 29, 2004 11:49 AM
To: Gryffyn, Trevor; [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.


Further info.

If I echo the session_id() onto the page I do get an id returned.  
So (correct me if I'm wrong) the session has started correctly with the
session_start() at the top of the page.

It just doesn't seem to save any of the session variables I set, or if
they are set, it can't retrieve them.

I get this error when trying to grab the $session['userid'] variable...

Notice: Undefined index: userid in C:\Inetpub\wwwOpSupDev\main.php on
line 37

-Original Message-
From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 9:19 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.


Random thought.. Did you check your PHP.INI on the 'bad' server to make
sure that it's configured the same as the 'good' server?

Some things to check:

Session.use_cookies = 1
Session.auto_start = 0  // This is the first one I'd check.  If you have
it set to =1 on the good server and aren't doing a session_start(), that
could do it I think

There are a bunch of other Session related parameters in PHP.INI..
Default timeout value.. If that's set too low, the session might
vaporize before you get a chance to see the info, etc.

Good luck!

-TG

> -Original Message-
> From: Jeff McKeon [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 28, 2004 7:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sessions not working.
> 
> 
> Pulling my hair out here.
> 
> I've got an IIS5 webserver running a php website just fine.
> 
> I created another web for a dev version of the first website.
> Installed PHP ect...
> When I load up the old websites files on the new site sessions won't
> work on the new site.
> 
> For some reason on the new site's phpinfo.php page, there is no 
> HTTP_COOKIE variable set under the "environmental" section.
> 
> Also, under the PHP Variables section, there is no
> _REQUEST["PHPSESSID"] or _COOKIE["PHPSESSID"] variable.
> 
> What have I missed!???
> 
> Here is a section of the phpinfo() for both sites.
> 
> Good Site:
> 
> Environment
> Variable Value
> ALLUSERSPROFILE  C:\Documents and Settings\All Users 
> CommonProgramFiles  C:\Program Files\Common Files
> COMPUTERNAME  WS02TC07927  
> ComSpec  C:\WINNT\system32\cmd.exe  
> CONTENT_LENGTH  0  
> GATEWAY_INTERFACE  CGI/1.1  
> HTTPS  off  
> HTTP_ACCEPT  */*  
> HTTP_ACCEPT_LANGUAGE  en-us  
> HTTP_CONNECTION  Keep-Alive  
> HTTP_HOST  opsup.telaurus.net  
> HTTP_USER_AGENT  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)  
> HTTP_COOKIE  PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f  
> HTTP_ACCEPT_ENCODING  gzip, deflate  
> INSTANCE_ID  3  
> LOCAL_ADDR  10.16.1.21  
> NUMBER_OF_PROCESSORS  1  
> Os2LibPath  C:\WINNT\system32\os2\dll;  
> OS  Windows_NT  
> Path  C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem  
> PATHEXT  .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH  
> PATH_INFO  /phpinfo.php  
> PATH_TRANSLATED  C:\Inetpub\wwwOpSup\phpinfo.php  
> PROCESSOR_ARCHITECTURE  x86  
> PROCESSOR_IDENTIFIER  x86 Family 6 Model 8 Stepping 10, GenuineIntel  
> PROCESSOR_LEVEL  6  
> PROCESSOR_REVISION  080a  
> ProgramFiles  C:\Program Files  
> REMOTE_ADDR  10.16.2.

Re: [PHP] Sessions not working.

2004-01-29 Thread Jas
Jeff McKeon wrote:
Ok, there seems to be some confusion about my setup so here it is
again..
I have 1 physical server runing win2k server with IIS-5

I have 4 virtual web servers configured in IIS-5, each with it's own IP
address.
Site1,Site2,Site1DEV,Site2DEV

All using the same php.ini and all set up identically in IIS (as far as
I can tell).
Site1 has no problems saving or passing $_session[] variables between
pages.
Site1DEV, currently and exact copy of Site1, will not pass $_session[]
variables between pages.


Session_test.php

";
echo "PHP Session Is Set!";
echo "The session is set! The PHPSESSID is: $sid Text = $text
and userid = $userid";
echo "link";
echo "";
}
else
{
echo "";
echo "PHP Session Is NOT Set!";
echo "The session is NOT set! Check your server configuration
or version.";
echo "";
}
?>
Session_test2.php




  



?>





On Site1 this works fine.  You get the sessionID and a link to
session_test2.php.  When you follow the link, session_test2.php displays
the contents of the $_SESSION['user'] variable.
On Site1DEV however, you see the sessionID on session_test.php and the
$_SESSION['user'] variable, but when you follow the link to
session_test2.php, the contents of the $_SESSION['user'] are blank.
What could be missing here in my server setup?

Thanks,

jeff

-Original Message-
From: Jeff McKeon 
Sent: Thursday, January 29, 2004 11:49 AM
To: Gryffyn, Trevor; [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.

Further info.

If I echo the session_id() onto the page I do get an id returned.  
So (correct me if I'm wrong) the session has started correctly with the
session_start() at the top of the page.

It just doesn't seem to save any of the session variables I set, or if
they are set, it can't retrieve them.
I get this error when trying to grab the $session['userid'] variable...

Notice: Undefined index: userid in C:\Inetpub\wwwOpSupDev\main.php on
line 37
-Original Message-
From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 9:19 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions not working.

Random thought.. Did you check your PHP.INI on the 'bad' server to make
sure that it's configured the same as the 'good' server?
Some things to check:

Session.use_cookies = 1
Session.auto_start = 0  // This is the first one I'd check.  If you have
it set to =1 on the good server and aren't doing a session_start(), that
could do it I think
There are a bunch of other Session related parameters in PHP.INI..
Default timeout value.. If that's set too low, the session might
vaporize before you get a chance to see the info, etc.
Good luck!

-TG


-Original Message-
From: Jeff McKeon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 7:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Sessions not working.
Pulling my hair out here.

I've got an IIS5 webserver running a php website just fine.

I created another web for a dev version of the first website.  
Installed PHP ect...
When I load up the old websites files on the new site sessions won't
work on the new site.

For some reason on the new site's phpinfo.php page, there is no
HTTP_COOKIE variable set under the "environmental" section.
Also, under the PHP Variables section, there is no 
_REQUEST["PHPSESSID"] or _COOKIE["PHPSESSID"] variable.

What have I missed!???

Here is a section of the phpinfo() for both sites.

Good Site:

Environment
Variable Value
ALLUSERSPROFILE  C:\Documents and Settings\All Users
CommonProgramFiles  C:\Program Files\Common Files  
COMPUTERNAME  WS02TC07927  
ComSpec  C:\WINNT\system32\cmd.exe  
CONTENT_LENGTH  0  
GATEWAY_INTERFACE  CGI/1.1  
HTTPS  off  
HTTP_ACCEPT  */*  
HTTP_ACCEPT_LANGUAGE  en-us  
HTTP_CONNECTION  Keep-Alive  
HTTP_HOST  opsup.telaurus.net  
HTTP_USER_AGENT  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)  
HTTP_COOKIE  PHPSESSID=ed09aa7b20d4032a3553c16a8f4a782f  
HTTP_ACCEPT_ENCODING  gzip, deflate  
INSTANCE_ID  3  
LOCAL_ADDR  10.16.1.21  
NUMBER_OF_PROCESSORS  1  
Os2LibPath  C:\WINNT\system32\os2\dll;  
OS  Windows_NT  
Path  C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem  
PATHEXT  .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH  
PATH_INFO  /phpinfo.php  
PATH_TRANSLATED  C:\Inetpub\wwwOpSup\phpinfo.php  
PROCESSOR_ARCHITECTURE  x86  
PROCESSOR_IDENTIFIER  x86 Family 6 Model 8 Stepping 10, GenuineIntel  
PROCESSOR_LEVEL  6  
PROCESSOR_REVISION  080a  
ProgramFiles  C:\Program Files  
REMOTE_ADDR  10.16.2.55  
REMOTE_HOST  10.16.2.55  
REQUEST_METHOD  GET  
SCRIPT_NAME  /phpinfo.php  
SERVER_NAME  opsup.telaurus.net  
SERVER_PORT  80  
SERVER_PORT_SECURE  0  
SERVER_PROTOCOL  HTTP/1.1  
SERVER_SOFTWARE  Microsoft-IIS/5.0  
SystemDrive  C:  
SystemRoot  C:\WINNT  
TEMP  C:\WINNT\TEMP  
TMP  C:\WINNT\TEMP  
USERPROFILE  C:\Documents and Settings\NetShowServices  
windir  C:\WINNT  

PHP Variables
Variable Value
_REQUEST["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f
_COOKIE["PHPSESSID"] ed09aa7b20d4032a3553c16a8f4a782f 
_SERVE

Re: [PHP] Sessions not working.

2004-01-29 Thread John Nichel
Jeff McKeon wrote:

Figured it out, I think.

PHP doesn't like the underscore in my website name.

http://site_dev.foo.com/ doesn't work but
http://192.168.2.50/ does.
If I rename the site in DNS to siteDEV.foo.com then it works fine.

Any ideas why?


The underscore (_) is not a valid character in URL's.

--
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] Deleting cookies won't work

2004-01-29 Thread Andrew Wood
Can anyone fathom out why I can't get the setcookie function to delete 
a cookie?

I'm calling it with the same arguments as I used to set it originally, 
but with a null string value & an expiry time in the past but the 
cookie persistently remains in the browser.

This how I set it:
 setcookie ("hhubpassword", md5($newpassword) , time() + 1209600, 
"/xchange/");

And this is how I'm trying to delete it:
setcookie ("hhubpassword", "", time() -3600, "/xchange/");
Thanks
Andrew
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Sessions not working.

2004-01-29 Thread Chris W. Parker
Jas 
on Thursday, January 29, 2004 1:06 PM said:

[snipped about 425 useless lines]

> Well in that case do a dump_vars($_session[],$_session[]) for each
> session variable you register and see if anything is listed.
> Jas

C'mon dude. Some of use are on dialup (not me now, but when I get home)
and that email REALLY needed to be trimmed.



Chris.

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



Re: [PHP] Sessions not working.

2004-01-29 Thread John Nichel
Chris W. Parker wrote:
C'mon dude. Some of use are on dialup (not me now, but when I get home)
and that email REALLY needed to be trimmed.


Chris.
I remember back in the day































We used to do stuff like this.



























To the people who were using.



























a 300 baud modem or slower..



























when we had 900 or better.



























Just to mess with them.



























Sorry, couldn't resist. ;)

--
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] Sessions not working.

2004-01-29 Thread Jas
John Nichel wrote:

Chris W. Parker wrote:

C'mon dude. Some of use are on dialup (not me now, but when I get home)
and that email REALLY needed to be trimmed.


Chris.


I remember back in the day































We used to do stuff like this.



























To the people who were using.



























a 300 baud modem or slower..



























when we had 900 or better.



























Just to mess with them.



























Sorry, couldn't resist. ;)

lmao!

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


Re: [PHP] Sessions not working.

2004-01-29 Thread Daniel Clark
That's GREAT ! :-)




> I remember back in the day
>
>



> Sorry, couldn't resist. ;)

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



Re: [PHP] Deleting cookies won't work

2004-01-29 Thread memoimyself
Hello Andrew,

On 29 Jan 2004 at 21:05, Andrew Wood wrote:

> I'm calling it with the same arguments as I used to set it originally, 
> but with a null string value & an expiry time in the past but the 
> cookie persistently remains in the browser.

>From the PHP manual:

"Cookies must be deleted with the same parameters as they were set with. If the value 
argument is an empty string (""), and ALL OTHER ARGUMENTS match a previous call 
to setcookie, then the cookie with the specified name will be deleted from the remote 
client."

Also from the PHP manual:

"Cookies will not become visible until the next loading of a page that the cookie 
should 
be visible for."

Don't know if the second snippet bears on your problem, but it might be worth 
considering.

Do you specifically need to use cookies for some reason? If you don't, consider using 
session variables. (Session variables involve cookies, but they're all set and removed 
automatically by PHP without your having to worry about it.)

Lastly, do you have some kind of firewall running on the machine on which you're 
testing your scripts? ZoneAlarm, for example, does all sorts of weird things to PHP 
sessions, and since sessions often depend on cookies, who knows? I really don't 
understand very well how firewalls interact with Apache/PHP, but this is definitely 
something else worth considering.

Good luck,

Erik

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



Re: [PHP] random?

2004-01-29 Thread Rob Adams
Chris,

I've checked your site and see you're still having the problem.  What
exactly isn't working?

  -- Rob

"Chris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Rob,
>
> Thanks for the ideaI think it is probably a better way to go also.
> Hers what I came up iwth...and the rest of the code pertaining to the
goal.
>
> I'm sure that I'm, overlooking something simple here, but I can't seem to
> make this work...
>
>
> srand ((double) microtime() * 100);
> $r = mysql_query('select count(*) as cnt from agentdb');
> $cnt = mysql_result($r, 0, 0);
> mysql_free_result($r);
> $rnd = rand(1, $cnt);
> $sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
> (agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and
> agentdb.agent_id <> 333)) LIMIT $rnd, 1";
>  $results= mysql_query($sql);
>  $agent=mysql_fetch_array($results);
>  $agent_ref = $agent['agent_ref'];
>  $agent_id =  $agent['agent_id'];
>  $agent_first = $agent['agent_first'];
>  $agent_last = $agent['agent_last'];
>  $agent_first = rawurldecode($agent_first);
>  $agent_last = rawurldecode($agent_last);

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



[PHP] trim your posts

2004-01-29 Thread Chris W. Parker
thanks.

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



RE: [PHP] random?

2004-01-29 Thread Chris
Warning: mysql_result(): supplied argument is not a valid MySQL result
resource in /home/virtual/site17/fst/var/www/html/function.php on line 51

Warning: mysql_free_result(): supplied argument is not a valid MySQL result
resource in /home/virtual/site17/fst/var/www/html/function.php on line 52

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in /home/virtual/site17/fst/var/www/html/function.php on line 58

I get the above repeating errors when I aply the code below to the random
function:

49 srand ((double) microtime() * 100);
50 $r = mysql_query('select count(*) as cnt from agentdb');
51 $cnt = mysql_result($r, 0, 0);
52 mysql_free_result($r);
53 $rnd = rand(1, $cnt);
54 $sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
(agentdb.agent_id<> 1115421) and(agentdb.agent_id > 100) and
agentdb.agent_id <> 333)) LIMIT $rnd, 1";
56
57  $results= mysql_query($sql);
58  $agent=mysql_fetch_array($results);
59  $agent_ref = $agent['agent_ref'];
60  $agent_id =  $agent['agent_id'];
61  $agent_first = $agent['agent_first'];
62  $agent_last = $agent['agent_last'];
63  $agent_first = rawurldecode($agent_first);
64  $agent_last = rawurldecode($agent_last);
65  $aimage= "agentpics/".$agent_id.".jpg";

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



Re: [PHP] Integration between ASP & PHP.

2004-01-29 Thread francesco
OK,
my problem is to use the crypt function (like md5(),sha1(),mcrypt(),crypt())
of PHP language in an ASP script.
For example:
<%
  First part of script in ASP language
%>

<%
 Second part of script in ASP language
%>
I don't know if this code is correct I don't try to use it, but this is what
I want to do.
Finally I want to share variables between the two languages (I hope!!).
Best regards,
Frank
www.automationsoft.biz

- Original Message -
From: "Gryffyn, Trevor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 29, 2004 9:30 PM
Subject: RE: [PHP] Integration between ASP & PHP.


Define "integrate"?

Using both ASP and PHP within the same physical file/script like:




<%
Aspcodehere
%?



??

...or going from ASP pages to PHP pages?
That is, "Default.asp" calls "menu.php" or something like that?


In the first case, I'm not sure if it's possible since the web server
passes the script to an interpreter based on what kinda of file it is.
.ASP and .ASPX are going to get sent to an ASP interpreter and .PHP, etc
are going to get sent to a PHP interpreter.

Not sure if you can get it to do both in the same file without some
tricky work.

Good luck though!  I'm curious to see if anyone knows of a way, but I'm
not sure I'd ever want to mix code like that.

-TG



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 29, 2004 3:19 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Integration between ASP & PHP.
> Importance: High
>
>
> Hi all,
> is possible to integrate script in ASP with script in PHP?
> How can I do this?
> All helps are precious.
> Best regards.
>

--
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] Integration between ASP & PHP.

2004-01-29 Thread Gryffyn, Trevor
I'd just do the crypt functions in ASP, that's going to probably be a
lot less nightmare than trying to blend the two.

Here's a page that seems to have some useful information on crypt and
md5 type functions for ASP:

http://www.aspin.com/home/components/security?pg=4&order=desc


As for sharing variables.. Good luck.  I guess you could save it out to
a cookie and read it back in to the other language, but I'm not sure
that you can share session data or anything like that.

There's ALWAYS a 'way'.. But you have to ask yourself it's easier or
more time efficient to bite the bullet and pick a language.

-TG

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 29, 2004 5:35 PM
> To: Gryffyn, Trevor
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Integration between ASP & PHP.
> Importance: High
> 
> 
> OK,
> my problem is to use the crypt function (like 
> md5(),sha1(),mcrypt(),crypt())
> of PHP language in an ASP script.
> For example:
> <%
>   First part of script in ASP language
> %>
>script PHP
> ?>
> <%
>  Second part of script in ASP language
> %>
> I don't know if this code is correct I don't try to use it, 
> but this is what
> I want to do.
> Finally I want to share variables between the two languages 
> (I hope!!).
> Best regards,
> Frank
> www.automationsoft.biz
> 
> - Original Message -
> From: "Gryffyn, Trevor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 29, 2004 9:30 PM
> Subject: RE: [PHP] Integration between ASP & PHP.
> 
> 
> Define "integrate"?
> 
> Using both ASP and PHP within the same physical file/script like:
> 
>  Phpcodehere;
> ?>
> 
> 
> <%
> Aspcodehere
> %?
> 
> 
> 
> ??
> 
> ...or going from ASP pages to PHP pages?
> That is, "Default.asp" calls "menu.php" or something like that?
> 
> 
> In the first case, I'm not sure if it's possible since the web server
> passes the script to an interpreter based on what kinda of file it is.
> .ASP and .ASPX are going to get sent to an ASP interpreter 
> and .PHP, etc
> are going to get sent to a PHP interpreter.
> 
> Not sure if you can get it to do both in the same file without some
> tricky work.
> 
> Good luck though!  I'm curious to see if anyone knows of a 
> way, but I'm
> not sure I'd ever want to mix code like that.
> 
> -TG
> 
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, January 29, 2004 3:19 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Integration between ASP & PHP.
> > Importance: High
> >
> >
> > Hi all,
> > is possible to integrate script in ASP with script in PHP?
> > How can I do this?
> > All helps are precious.
> > Best regards.
> >
> 
> --
> 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



  1   2   >