[PHP] Q. How to remove new line/CrLf in string??

2003-03-20 Thread Jack Schroeder

Hello:
I am trying to use an ASCII/Txt database for a 'for sale by owner' site. 
I need to figure out a way to remove any carriage returns entered into a
"Comments" string because \n is the record delimiter. I have tried the
nl2br() fundtion but that seems to ad the  but doesn't remove the
\n. Any help any one. 

Thanks

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



Re: [PHP] Help with session needed

2003-03-09 Thread Jack
On Sun, 9 Mar 2003 21:18:33 +0100
"Øystein Håland" <[EMAIL PROTECTED]> wrote:

> The problem is the cookie soon reaches the 4 kb limit, so I would like to
> achieve the same using session. The trouble is, I don't know how to do. I
> would appreciate any help that brings me closer to a solution on this.

have a look in the manual:

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

in the middle of that page are some examples, which may help you.

bye

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



Re: [PHP] php/mysql grouping output

2003-03-09 Thread Jack
On Sun, 9 Mar 2003 14:56:31 -0500
Kelly Meeks <[EMAIL PROTECTED]> wrote:


> Order Num Order Date  Product CodeProduct Name
> ---
> 1 2003-01-01  12345   product xyz
> 2 2003-01-01  12345   product xyz
> 3 2003-01-01  abcde   product abc
> 1 2003-01-01  abcde   product abc
> 5 2003-01-01  12345   product xyz
> 
> If I wanted to have the output grouped on any of the fields, how would I go about 
> doing it?
> 

append to your query:
... GROUP BY tablename.column_name

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



[PHP] Can php works as a scheduler?

2003-01-20 Thread Jack
Dear all
I built a page which will import data from csv files to database, i want
this task to be done automatically at the midnight of each date.

so does anyone know if there is any function work as similar as Scheduler in
php? so php will run the script at specific time!

Thx a lot
Jack
[EMAIL PROTECTED]



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




[PHP] PHP and DB2

2003-01-10 Thread Jack Schroeder
Can PHP connect to IMB DB2 dbms running on an AIX Unix server?

Jack


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




[PHP] Can i convert a text file to PDF only when need!

2002-12-17 Thread Jack
Dear all
Can i use php to convert text file to pdf?
i'm using the windows platform and i need to convert thousands of text file
to pdf format, which cause me a lot of trouble, cause once the convertion
process start, i can't use the pc for the next 5 hours, so here is the idea
i'm thinking of:

Those text file is stored into one folder, so when the user want to view
them through the web page (An interanet), it will open this text file and
then convert it to a pdf file for user to read. After the user had finished
reading, the converted pdf file will store in another folder, so when the
user want to view the file on next time, it will safe some time for
convertion!

I don't really know how i can install the pdf library to php under windows
os, can anyone pls give me some hints? and any recommendation will be great!

Thx a lot!

Jack



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




[PHP] Can php auto execute it's script in schedule without opening a webpage?

2002-12-15 Thread Jack
Dear all
I just wonder did anyone know if php can act as a scheduler rather than
execute script manually?
i want to set a schedule for php to run certain script at specify time, to
what i understood in php is : the script can only be process when a homepage
had been execute. but i want the script to be excute even no one open a
homepage contain php script in it!

is there anyway i can do that?

thx
Jack



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




[PHP] Problem on OpenDir()

2002-11-25 Thread Jack
Dear all
here is the path i want to open for reading files from it!
path = "c:/pdf_reports/bills/Oct-02"

i always got returned with these error :

" Warning: OpenDir: Invalid argument (errno 22) in c:/page.php on line 21"
"Warning: Supplied argument is not a valid Directory resource in c:/page.php
line 22"

but

when i change the path to : "c:/pdf_reports/bills/"
then
it can list all the files within this folder "bills".

I'm sure that the folder Oct-02 is exist inside bills directory! So i
haven't go any idea!

Could someone pls give me some hints!

Jack



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




[PHP] Problem on OpenDir()

2002-11-21 Thread Jack
Dear all
I was trying to check if a directory exist in a specific folder, but i got this error 
message as below : 
Warning: OpenDir: Invalid argument (errno 22) in C:\InetPub\wwwroot\Nedcor Internal 
Live\Reports\Bills Reports\page.php on line 21

here is the code : 



[PHP] Simple Question on Date conversion

2002-11-20 Thread Jack
Dear all
Can anyone pls tell me how i can turn number : 10 to Oct?
i counting on the month, that's why i won't to convert the result to month!

Thx a lot

Jack



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




[PHP] Cookie error after 4.2.3 upgrade

2002-11-08 Thread Jack Sasportas
I get the following error when using a previously working cookie function:
expects parameter 3 to be long

Code is below... I just don't see the difference then the way the doc uses:
time() - 3600

-vs- the way I did it below...

Thanks !

function f_put_cookie($user_name,$user_email,$account_type,$company_name) {

   global $HTTP_COOKIE_VARS;
   global $s_c_url;

   $l_url = ".".$s_c_url;
   $l_cookie_expireN = date('r', time() - 4000 );
   $l_cookie_expire = date('r', time() + 400 );
   $l_cookie_expire2 = date('r', time() + 400*30*12 );

   setcookie("c_user_email","",$l_cookie_expireN);
   
setcookie("c_user_email",$user_email,$l_cookie_expire2,'/',$l_url,0);
   
setcookie("c_user_name",$user_name,$l_cookie_expire,'/',$l_url,0);
   
setcookie("c_account_type",$account_type,$l_cookie_expire,'/',$l_url,0);
   
setcookie("c_company_name",$company_name,$l_cookie_expire,'/',$l_url,0);
   setcookie("c_uas_time", 
"GREEN",$l_cookie_expire,'/',$l_url,0);
}



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



[PHP] Help w/ 4.2.3 Problem

2002-11-08 Thread Jack Sasportas
I have been running 4.1.2 fine, but decided to compile in the latest 
version 4.2.3.
When I run some existing code that works perfect under 4.1.2, not only 
does the code not run properly, but there are no error messages in the 
error_log ( apache file ).
also in php.ini I  added log_errors = On, and error_log = php_log, but I 
never see any error messages.

Running on RedHat 7.2 with apache_1.3.27, mod_ssl-2.8.12-1.3.27, 
openssl-0.9.6g, php-4.2.3.
( Again this all ran fine with php-4.1.2 ).

Any ideas on where to start ?

Thanks

--
___
Jack Sasportas
Innovative Internet Solutions 
Phone 305.665.2500	
Fax 305.665.2551	
www.innovativeinternet.com
www.web56.net




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



[PHP] How to convert the text file into pdf file in php

2002-10-16 Thread Jack

Dear all
I want to make a script which will ask php to convert the source file into
pdf file format n then save it to somewhere else, but i don't know if php
can do such thing, so could you pls help me on this?
Thx a lot
Jack



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




[PHP] How to do Date Calculation

2002-10-10 Thread Jack

Dear all
I'm trying to make a script which will show the month before current month!
Is there anyway i can do this?

Example :

CurrentPervious

OctoberSeptember

Thx a lot
Jack
[EMAIL PROTECTED]



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




[PHP] Can PHP convert word to PDF

2002-08-12 Thread Jack

Dear all
Can PHP be able to convert a Word Document to PDF?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] Upgraded to 4.2.2 on Win2k - server (including ASP) crashing

2002-08-04 Thread Jack Baty

I upgraded from 4.1.1 to 4.2.2 on Win2000 running IIS. I immediately starting
having problems with IIS hanging after a few requests. I tried all sorts of
nonsense and its only got worse. In desperation, I copied all of the dll's in
the php distribution into /winnt/system32, overwriting the existing files.
Now I've got php running fine, but as soon as any *php* page is accessed, ASP
pages stop responding. Actually, they do respond with this: -2147417842
(0x8001010e).

Restarting IIS clears it up until the next php page loads. Any ideas? The ASP
folks developing on the server are getting (understandably) irritable.



-- 
Jack Baty
Fusionary Media - http://www.fusionary.com/



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




[PHP] Consideration on Upgrade php

2002-07-31 Thread Jack

Dear all
Currently i'm using PHP 4.04 in my Web Server, i heard that there is a bit
different on the newer version of php! Like : something different in
php.ini!
I know that the newest version of php is 4.2.2, could someone pls tell me if
there is different between PHP 4.0.4 with 4.2.2?
I heard that when you post data from a form to other page, 4.2.2 will have
problem, unless you got to set something from php.ini? is that right?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] Question on File Move / Delete and Create Directory

2002-07-31 Thread Jack

Dear all
I had setup a web server in windows NT 4.0 (IIS Server), there is some
question i want to ask bask on the file management!

1. Is there any function in php that can create a folder/Directory in a
specific path?

2. Is there any function in php that can move particular files to other
location?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] How to Detect File in a Specifc Directory on Window Env?

2002-07-19 Thread Jack

Dear all
I had a folder which contains a lot of pdf file, the name format of the pdf
files are : x.dateformat.pdf (eg : abcdefg.20020718.pdf).
Now i want to use the php script to detect what files it got in a specific
folder.
i want to make a user input form which will let user to input the date and
then i will look for the pdf report from this specific folder base on the
Date given!

I think one of the quickest way is to ask php to check the filename from
"Right to Left" which is the Date format!

But i don't know which php function will perform this task (Check filename
from Right to Left).

If you have any other suggestion, pls help me!


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] Problem on file_exists() function

2002-07-17 Thread Jack

Dear all
I had made a test.txt file which stored in the following window path :
c:\pdf_reports\dealing\test.txt,
In my page, i ask php to check the test.txt exist in foler
(c:\pdf_reports\dealing) using the following script:

if (file_exists("c:\\pdf_reports\\dealing\\test.txt"))
{
print ("exist");
}
else
{
print ("Doesn't Exist!");
}

It seems that php can't detect the file in such path!!!
I had made another test on this, i moved the test.txt to one level up which
is (c:\pdf_reports) and i use the following script :

if (file_exists("c:\\pdf_reports\\test.txt"))
{
print ("exist");
}
else
{
print ("Doesn't Exist!");
}
Then it can detect the file is there! why?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] Problem on file_exists()

2002-07-15 Thread Jack

Dear all
I had a folder which the path is : (\\nedcoraa\pdf_reports\dealing
room\report) it stores a lot of PDF reports in there.
I'm trying to use the file_exists() function to detect if a specific file
exist in this folder, but i got a problem is :
It seems that php can go through (\\nedcoraa\pdf_reports) but it can't go
through (dealing room) folder. i had made test on it, i moved a file into
(\\nedcoraa\pdf_reports), then php can detect it, but if i move it to
(\\nedcoraa\pdf_reports\dealing room), then it can't detect the file! why?

I'm using php in windows NT IIS environment!

Please help me!

--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] How to dectect if a file exist in specific Folder

2002-07-10 Thread Jack

Dear all
I had a folder which contain some pdf report, the name of the Report will be
:
xxx.xxx.20020702.pdf.

Here is what i want to do :
1. there will be a Form let user to submit the date of reports that he / she
wants to view.
2. the php will get the xxx.xxx from a mysql database and add the date at
the end of the string as the file name.
3. If the filename exist in that specific folder, then it will show a
hyperlink for each exist report, otherwise nothing will shows up!

I want to know how i can use php to detect if such file is exist in that
specific Folder?

--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Jack

Dear all
i made a Registration Form for user to input their Data, but i also had some
Field Check before the data can be insert to the Mysql_Database!
I had a question here, sometime the mysql shows the error :
"Duplicate Key for xxx"
I know what is this about, reguarding to my Registration Form, it mean the
Login Name is Duplicated! But i want to show my own message to the user for
this error instead the Mysql Error! It is meanness to show User the Mysql
Error, cause they won't understand it!!!

Could Someone pls tell me how i can do this?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] Date Comparsion

2002-06-18 Thread Jack

Dear all
I had a form which let user to input the leave_from and leave_to date into,
the format of the date that user input is "-mm-dd".
Now i want to compare the leave_from and leave_to date to find out the
number of days between!

What should i do or any function in php can provide this operation?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] Problem on fread!

2002-05-13 Thread Jack

Dear all
I had a problem with fread function!
I had a text file containning a date, so inside the text file, it was
something look like this : 05032002
then now i want to read this file but want to seperate the dd -mm-, so i
want to get the first two digit as the (day), then nex two as the (month)
and last four as (year) to display in my "INPUT BOX".

How i can read a file by telling it how much digit i want?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] Strange Form Action Type

2002-04-30 Thread Jack

Dear all
I had saw a form which is quite strange, because it look some as below:



as the deposit_admin.php is actually itself, but the "?save=yes" is
represent what meaning?

Can someone pls tell me?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] How to see the error from mysql?

2002-04-29 Thread Jack

Dear all
I had made a page which import some csv file data into Mysql, when i test
this page, it doesn't show any message or error, but the data didn't load
into mysql table, so is there anyway i could use in php to show me the
status of mysql?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] Problem on Load CSV file to Mysql through PHP Script

2002-04-26 Thread Jack

Dear all
I had a problem which trying to load data to Mysql Table,
Here is my code in my HTML:



Untitled Document



  



The code above is to see if the variable passed from other form($select) is
"HKD RATE"  or not , if it is, then it will call Mysql to perform LOAD DATA
from a csv to hkd_deposit1 table.
As the result comes out that the mysql didn't do any thing at all, it
doesn't import the data from hkd_rate.csv to hkd_deposit1.
I had tested using different query , which change the 'importquery' to
"delete from hkd_deposit" in php, by using this as the query, it works!It
did delete all the record from hkd_deposit table!

I had test the query in myCC program which design for MYSQL Operation, it
can successfully import the csv file into table, but i don't know why it
won't work with php script!

Pls give advice see if i got anything wrong in php!


--
Thx a lot!
Jack
[EMAIL PROTECTED]








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




[PHP] Can't Load Data into Mysql Using "LOAD DATA"

2002-04-24 Thread Jack

Dear all
 I'm trying to load data from a test.csv file into myql database, but it
seems the data didn't get into the table!!

I use a GUI Program which i type in the Mysql Command to it and execute it,
so i type in the following command :
"Load Data Local infile 'c:\test.csv' into to table testdeposite lines
terminated by ","
it shows the command had successfully executed, by when i type "select *
from testdeposite" which want to check if the data is successfully inserted,
it say no record exist in table!

Could someone pls tell me what happen here?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




[PHP] equivalent of qw?

2002-04-18 Thread Jack Dempsey

Hi all,

I often find myself creating long arrays like so

$a = array(
a
b
c
d
e
f
r
foo
bar
etc
...
);

is there an easy way I don't know about to quote those vars? Basically just
looking for an easier way to make such an array without adding teh quotes
and commas, something like perl's qw.

Thanks!

Jack Dempsey


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




[PHP] how to get row by row from CSV file

2002-04-18 Thread Jack

Dear all
I'm a beginner of php, i tried to get the CSV file, but it return like
Column by Colume, but how i can get it in Row by Row, cause i want to point
to specific data i want, but not the whole file content!

--
Thx a lot!
Jack
[EMAIL PROTECTED]




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




[PHP] How to get Specific Data from an CSV format file to PHP

2002-04-18 Thread Jack

Dear all
I had tried to fetch the data from CSV file by using PHP, what i did is
fetch the whole file content!
But now i only want specific data from that CSV file, is there anyway in php
that can point the pointer to specific data i want?


--
Thx a lot!
Jack
[EMAIL PROTECTED]




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




RE: [PHP] Re: arguments against php / mysql?

2002-04-11 Thread Jack E. Ambrose

Have you looked into Chilli Soft? It's an ASP interpreter for Apache and a
number of other platforms. Fairly good from what I've heard, and owned by
Sun now it appears.

http://www.chillisoft.com/

Jack

-Original Message-
From: Mallen Baker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 12:34 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]; >
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: arguments against php / mysql?


Thanks to Michael, Barry, Steve, Cal and Rasmus for replies.

We have just taken a contract for a dedicated server, and I tried rather
hard to get it to be a Linux server. The killer for that was that we have a
significantly complex site that will need to be migrated to the server which
has been coded in asp - which leaves us rather stuck with Windows and IIS. I
stared this hard in the face and asked questions about the cost of recoding
before being reluctantly persuaded this had to be.

So that being the case, am I picking up the message that the criticisms are
basically correct? ie. no-one ought to start from here, but if you're forced
to use IIS (because asp won't work with anything else) then php / mysql is
not going to be the way to go (xxx are proposing coldfusion / sqlserver).

Thanks - Mallen

>>> Michael Kimsal <[EMAIL PROTECTED]> 04/10/02 08:59pm >>>
Barry C. Hawkins wrote:
 > Mallen, It sounds like you might have some non-technical or
 > open-source execs to talk to, and that a non-MS platform is not an
 > option (yet :^) ).  If so, here are some more "managerial"-type
 > arrows for your quiver:
 >
 > 1.) MySQL was one of the top 2 databases in a Ziff-Davis major vendor
 > "shootout" recently, ranking alongside Oracle 9i.  See
 >
 > http://www.mysql.com/news/index.html
 >
 > under the heading "MySQL a winner in server database clash".  They
 > like products more if they're mentioned in the same sentence as
 > Oracle.  Oracle was on the SuperBowl, you know. :^)
 >
 > 2.) Actually, PHP doesn't officially say that CGI is the recommended
 > install for IIS.  They simply issue a few caveats regarding SAPI.
 > Check it out at:
 >
 > http://www.php.net/manual/en/install.windows.php

"Officially" perhaps but I think the overwhelming consensus has been
that ISAPI under Windows just didn't work.  It *does* work now, as
long as you don't use any third party DLLs (like MySQL, GD, etc)
rendering it pretty useless.

Sorry, it's just anecdotal evidence, but you'll notice that no one in
the PHP camp will unequivocally say that PHP under ISAPI is solid.  The
silence on ISAPI speaks volumes right now.




 > 3.) I have nothing to offer on the search engine issue.
 >
 > Now, I know that some of what I just said will incense some folks,
 > because yes, ideally this poor fellow would be able to use *nix with
 > Apache, MySQL, and PHP.  But, since he may not have that luxury,
 > these items might put enough "spin" on things for him to get the Open
 > Source items in the door.  Once that initial "yes" has been given,
 > the subsequent steps might come more easily.

If the only way to get "open source" products in the door is
to have them running half-crippled (running on OSes they weren't
designed for) you're giving "open source" products a bad image.  No one
expects ASP to run on anything but IIS (chilisoft notwithstanding).  If
the server HAS to be Windows, use ActiveState's Perl or something else
with a company behind it and just go down that road.

Having PHP run poorly under Windows will just make PHP look bad, even if
it's Windows' fault.

Michael Kimsal
http://www.phphelpdesk.com
734-480-9961






This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk




This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk


--
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] mail() problem...

2002-04-03 Thread Jack Davis

I wrote a small piece of code to take a text file with
a list of email addresses in it one per line and send out
an email to each of them like so...

$headers = "From:  [EMAIL PROTECTED]\r\n";
$headers .= "Reply-To: [EMAIL PROTECTED]\r\n";

$message = "Blah Blah Blah";

$subject = "Subject of the message";

$arrText = file("test.txt");

for ($i=0; $ihttp://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to Pass the Username which from Windows Login

2002-03-24 Thread Jack

Dear all
I want to prevent user to make another login before they can browse the
Intranet, so is there anyway that php can grep the username from the windows
Login or Domain Login?
Which means if a user can login to the Windows NT, then he/she will have the
right to browse the Intranet!

Thx a lot
Jack
[EMAIL PROTECTED]



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




[PHP] Is there anyway to save a file into Mysql database

2002-03-24 Thread Jack

Dear all
Can someone pls tell me is php will be able to grep text from MS Word and
then save that word file into MYSQL database? Which means is MYSQL will be
able to store files into it's table?

Thx a lot
jack
[EMAIL PROTECTED]



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




[PHP] When Click a HyperLink, Promp password before Showing the Page

2002-03-24 Thread Jack

Dear all
Can someone pls tell me how i can make a behavior in php which when a user
click on a hyperlink, then a page for login will appear first and then once
the username and password is right, the page of which user aiming to browse
will show, otherwise  a error message will tell the user that the username
or password ar not correct.
I know it will be easy if there is only one hyperlink, but what happen if
there are many of them?

Thx very much
Jack
[EMAIL PROTECTED]



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




[PHP] Is there any Possible Way to get data from Excel File?

2002-03-19 Thread Jack

Dear all
What i'm planning to do is to use php to grep the data from a Excel file and
then insert it to the MySQL Database, so is there any possible way that the
php can grep the data from an Excel File?

Thx all
Jack
[EMAIL PROTECTED]




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




[PHP] Can anyone help me with this problem(uploads via a form)?

2002-03-19 Thread Jack E. Ambrose

I'm having a problem with file uploads via a HTML form. I've no luck getting
it to work. After a bit of research I think I've determined that the problem
lies with my host having safe mode enabled and setting a open_basedir that
is outside my scope. Here is my upload test page which is a direct lift from
the php.net manual on file uploads(file size is limited to something like
1):

http://www.logicalsystem.com/testup.php

Things I've done to attempt a work around:

1) Creating a directory and giving it chmod 777 permissions.  (Didn't work)
2) Tried using fread/fopen. (Nope)
3) Praying to the PHP gods. (They haven't listened to me yet)

Can't anyone provide any suggestions on how to work around this? I can
provide more information if required, code, phpinfo() output, etc.

Thanks!
Jack



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




[PHP] Having problems doing a binary upload. open_basedir problem?

2002-03-17 Thread Jack E. Ambrose

I'm attempting to get file uploads via a HTML form to work. I've been 
working on this for a couple of days, reading the PHP.net manual, and 
searching the newsgroups and various web sites. Haven't come up with a 
solution to my problem.

Basically I'm unable to upload any files to my web site. I don't have 
control over the server since my site is hosted. Here is the error messages 
I'm getting followed by the code.

** HTML output: **
User file: /tmp/phpEhNNmW
User filename: biglaugha.gif
User file size: 1370
User file type: image/gif

Testing short track var names.
$_FILES['userfile']['tmp_name']: /tmp/phpEhNNmW
$_FILES['userfile']['name']: biglaugha.gif

Warning: open_basedir restriction in effect. File is in wrong directory
in /usr/local/psa/home/vhosts/logicalsystem.com/httpdocs/up_load.php on
line 18 

Warning: Unable to create '/httpdocs/biglaugha.gif': No such file or
directory in
/usr/local/psa/home/vhosts/logicalsystem.com/httpdocs/up_load.php on
line 23 

Warning: Unable to move '/tmp/phpEhNNmW' to '/httpdocs/biglaugha.gif' in
/usr/local/psa/home/vhosts/logicalsystem.com/httpdocs/up_load.php on
line 23 
** end of output **


** HTML/PHP file containing the form **



Test Upload


  
Send 
this file:  
 




** end of file **

** PHP files that processes the submitted form(up_load.php) **
User file: $userfile";
print "";
print "User filename: $userfile_name";
print "";
print "User file size: $userfile_size";
print "";
print "User file type: $userfile_type";
print "";
print "Testing short track var names.";
print "\$_FILES['userfile']['tmp_name']: ".$_FILES
['userfile']['tmp_name'];
print "";
print "\$_FILES['userfile']['name']: ".$_FILES['userfile']
['name'];
print "";

// In PHP 4.1.0 or later, $_FILES should be used instead of 
$HTTP_POST_FILES.
//This code is a direct lift from the PHP.net site.
if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) 
{
//made some changes to this line to reflect target directory.
//I also have another directory /httpdocs/tmp that has rwx for world.
//Same results
copy($HTTP_POST_FILES['userfile']['tmp_name'], "/httpdocs/");
} else {
echo "Possible file upload attack. Filename: " . $HTTP_POST_FILES
['userfile']['name'];
}
/* ...or... */
move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], "/httpdocs/
$userfile_name");
?>
** end of file **

** Some vars returned using phpinfo() **
safe_mode: On 
open_basedir: /usr/local/psa/home/vhosts/logicalsystem.com/httpdocs
upload_tmp_dir: /tmp

PHP is version 4.1.0

The end goal is to put the data into a database. I've used the fopen and 
fread functions with not success. I backed off and tried the example from 
the PHP.net manual and that doesn't work either. This appears to be a 
problem with safe mode and/or open_basedir being set. Is there a work 
around or something? 

Thanks!
Jack

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




[PHP] Help w/passing a search parameter that includes space and ,

2002-03-15 Thread Jack Sasportas

I have never passed a search value with a space or a comma "," in it,
but here is the first time.
What happens is that IE puts in the space and takes the whole value as
the parameter and correctly finds the result we are looking for from the
search request, but in Netscape it only sees up to where there is a
space or where there is a comma.
Here is how the search value looks from the command line in the browser

display_products.php?search_value=Toilet Tissue,  2-Ply

Within the application it returns there is no match for Toilet which
basically tells me that php thinks that's the end of the string being
passed to it. 
Any ideas on how I should get around this ?

This is what the db search string looks like:

$db_result = mysql_query("select * from $db_tablename where
category='$value'");


Thanks !
___
Jack Sasportas

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




[PHP] What is "->" mean in php?

2002-03-04 Thread Jack

Dear all
There is one symbol in PHP that i always see is "->", could anyone pls tell
me what is this, and what does that do?
Here is the statement i saw could some pls explain what it means?

if (!empty($row->usd_period)

Thx a lot
Jack
[EMAIL PROTECTED]



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




[PHP] Windows Logon Username Pass to PHP

2002-02-21 Thread Jack

Dear all
Is there any ways that i can pass the Windows Logon Username to PHP?
Any Built in Function that can handle this? cause i don't want the user to
logon so many times and my website is for internal only!

Thx
Jack
[EMAIL PROTECTED]



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




[PHP] Don't Know how to Set the include Path

2002-02-19 Thread Jack

Dear all
I had create a file called "contant.inc".
What i want to do is to use the require function() to point to this file,
but when i test it, it says:

"Warning: Failed opening 'constant.inc' for inclusion (include_path='') in
C:\InetPub\wwwroot\php study\General News\news.php on line 17"

Then, i go to PHP.ini from C:\winnt and find the row which got the
"include_path=". What i did is i had type in the path like this format below
:

include_path = "c:\inetpub\wwwroot\php study"; UNIX:
"/path1:/path2"  Windows: "\path2"

actually i just type the "c:\inetpub\wwwroot\php study"
but not the
;UNIX: '/path1:/path2" Windows:: "\path2", that is there by default.

Then i test again from my web, it remains the same error!!

So could someone pls tell me how i should set the include_path, would be
great if you could provide EXAMPLES!

Thx a lot
Jack
[EMAIL PROTECTED]





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




[PHP] What is the different between Apache and IIS?

2002-02-19 Thread Jack

Dear All
I had Setup a Website in a IIS Server 4.0, but i just want to know what is
the different between the Apache Server and IIS server?

Thx
jack
[EMAIL PROTECTED]



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




[PHP] test

2002-02-19 Thread Jack

Dear All
I had Setup a Website in a IIS Server 4.0, but i just want to know what is
the different between the Apache Server and IIS server?

Thx
jack
[EMAIL PROTECTED]



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




[PHP] Can php Read contents from MS Word in Exactly same format

2002-02-03 Thread Jack

Dear all
I had made  a news input page for one of the HR Manger to input the news for
the whole company to read, she is quick comfort with using MS word as a
editor, so is there anyway that the php can read the contents from the MS
Word and display as exactly same format to html?

If there is so, could any one suggest a book to me?

Thx a lot
Jack
[EMAIL PROTECTED]



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




[PHP] What is ? Mean in the Action Box

2002-01-31 Thread Jack

Dear all
I had open a webpage which design from my company's pervious staff!
This page is a input form, and when i look at the properity of the Form i
saw this:

form name="o_form" action="deposit_admin.php?save=yes" method="post"

What is the "?" mean in the Action part?

Thx
Jack
[EMAIL PROTECTED]



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




[PHP] http error 405

2002-01-30 Thread Jack

Dear all
I had made a login page for user, but once when you user had login failed,
there will be a error appear which is "HTTP ERROR 405", could someone pls
tell me what is that mean on that error?

and here is my code for my internal website.

===

http://microsoft.nedcor.com.dev/index.php";);
 }
 else
 {
 header ("Location: http://microsoft.nedcor.com.dev/login.php";);
 }
}
?>
===

Thx a lot
Jack
[EMAIL PROTECTED]



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




[PHP] Call another page after the menu had been selected

2001-12-27 Thread Jack

Dear all
I'm using UltraDev which build a form containing a menu, there a two items
inside this menu for user to choose. This form is using Post Action to
$php_self which means it will pass back the variable to itself.
Then here is the question:

 what should i do if i want to call a page prompt from a blank window when
the item A is selected?
and another page when Item B is selected!

thx a lot
jack
[EMAIL PROTECTED]



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




[PHP] Login and select Query in Mysql

2001-12-26 Thread Jack

Dear all
I want to provide a login page to the user when they want to visit my
website, i got no idea what should i used.
First i have a login.php page which got two input box, one for username and
one for password.
Then i have a login table with mysql database which contain the valid user
and password.
And i have a index.htm which let the user browse my website.This index.htm
is consist of three frame, top, left and main. Each frame contain different
page(.php).

Task :
User will login first through login.php, then the username and password
provided by user will need to match the table called login.
Once the username and password is correct, the username will be hold in a
place for the further use inside the website(eg: when user want to see the
leave history records, it will only show it's own record by select the query
using the username section).
then user will direct into index.htm.

Could someone pls give me a idea how i should make this system work??

Thx
Jack
[EMAIL PROTECTED]



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




[PHP] Cookie Can't Display Name on other page

2001-12-21 Thread Jack

Dear all
Here is the Code for my Login.php page

Execute($KT_rsUser_Source) or
DIE($Mysql_nedcorhk->ErrorMsg());
  if ($KT_rsUser->RecordCount()==1) {
// username and password match - this is a valid user
$KT_Username=$KT_valUsername;
session_register("KT_Username");
if ($KT_fldUserAuthorization != "") {
  $KT_UserAuthorization=$KT_rsUser->Fields($KT_fldUserAuthorization);
} else {
  $KT_UserAuthorization="";
}
session_register("KT_UserAuthorization");
if (isset($accessdenied) && false) {
  $KT_redirectLoginSuccess = $accessdenied;
}
$KT_rsUser->Close();
session_register("KT_login_failed");
 $KT_login_failed = false;
header ("Location: $KT_redirectLoginSuccess");
exit;
  }
  $KT_rsUser->Close();
  session_register("KT_login_failed");
  $KT_login_failed = true;
  header ("Location: $KT_redirectLoginFailed");
  exit;
setcookie("username",$user);
}
?>


Login Page


<!--
function MM_findObj(n, d) { file://v4.0
  var p,i,x;  if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_validateForm() { file://v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2];
val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
  if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an
e-mail address.\n';
  } else if (test!='R') {
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
  min=test.substring(8,p); max=test.substring(p+1);
  if (val<min || max<val) errors+='- '+nm+' must contain a number
between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is
required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
file://-->




  Nedcor Internal WebSite
  Please Provide your Username and Password for the Internal
Web.
  ");
print ("Session Name : " . session_name() . "\n");
print ("Session ID : " . session_id() . "\n");
?>
  

  

  Username


  

  
  

  Password


  

  


  
  

  
   





I had use the setcookie function in the script which is
, then in the Main.php page, i set another
script .
Then the strange things happen, the Main.php won't show the name from
cookie! actually the $user you saw in setcookie is the input box where the
user input their username to login!!
Another way i had tried is , if i set the cookie like this
, then the Main.php will display it.
Could someone pls tell me why it happen like this???

Thx a lot!!
Jack
[EMAIL PROTECTED]



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




[PHP] Problem with Getting Values from Cookie

2001-12-21 Thread Jack

Dear all
Here is my Code in
Login Page!!!
Execute($KT_rsUser_Source) or
DIE($Mysql_nedcorhk->ErrorMsg());
  if ($KT_rsUser->RecordCount()==1) {
// username and password match - this is a valid user
$KT_Username=$KT_valUsername;
session_register("KT_Username");
 setcookie("username",$KT_Username,time()+600);
if ($KT_fldUserAuthorization != "") {
  $KT_UserAuthorization=$KT_rsUser->Fields($KT_fldUserAuthorization);
} else {
  $KT_UserAuthorization="";
}
session_register("KT_UserAuthorization");
if (isset($accessdenied) && false) {
  $KT_redirectLoginSuccess = $accessdenied;
}
$KT_rsUser->Close();
session_register("KT_login_failed");
 $KT_login_failed = false;
header ("Location: $KT_redirectLoginSuccess");
exit;
  }
  $KT_rsUser->Close();
  session_register("KT_login_failed");
  $KT_login_failed = true;
  header ("Location: $KT_redirectLoginFailed");
  exit;
}
?>

What i want to do is after i had set the cookie, then i got to main.php
which is one of the page within the site and i type :

It got nothing to print out!!!

Pls help!!
Jack
[EMAIL PROTECTED]



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




[PHP] FrameSet Problem with PHP, Pls Help!

2001-12-21 Thread Jack

Dear all
I had designed a Index.php, this page is made of different Frames by using
UltraDev.The Frame included are Top, Left and Main. In my Left Frame which i
used left.php, i had use JavaScript to make a Menu. Top Frame is a Banner
and Main is just some content. When i browse preview it, the page just go
Perfect!
Then Later on.
I had a Login.php page which will let user login before they can access my
Internal Website.
In my Login.php Page, the user will type in the Username and Password, and i
had set to post these two var to Index.php. and in Index.php just before the
 tag, i add a scrpt:
 This Check.php is actually the script which will
verify the Username and Password passed from Login.php.
Once  and add into Index.html, then there is
nothing shows up, not even frames, menu or any Banner!!
Could someone pls help me with this!! I'm Stuck!!!

Thx a lot!!
Jack
[EMAIL PROTECTED]



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




Re: [PHP] Re: PHP 4.1.0 patch for Quanta IDE, The Sequel

2001-12-20 Thread Jack Dempsey

really?


seems sensitive to me...

Mike Eheler wrote:

> Cool, however PHP is not case sensitive, nor is ASP or HTML for that
> matter, therefore case sensitive syntax highlighting will not be good
> for these languages.
>
> Mike
>
> J Smith wrote:
>
> > I sumbitted a similar patch to the Quanta team about a week ago. It may
> > appear in an upcoming release, possibly Quanta 3, which will come with KDE
> > 3.0.
> >
> > A few other additions I made:
> >
> > - highlighting is now case-insensitive for everything. I believe older
> > versions were case-sensitive for keywords, like function, class, etc.
> >
> > - support for ASP-style opening and closing tags (<% and %> instead of
> >  >
> > I'm also working on porting a newer editor from Kate/ktexteditor into
> > Quanta. It's been slow going, but things have picked up (it compiles and
> > runs now, albeit with a bunch of segfaults). This will make adding syntax
> > highlighting instructions much easier, as the latest versions of Kate allow
> > you to define highlighting rules in XML files, and the highlighting
> > instructions are set up at run-time rather than compile time.
> >
> > Maybe over the XMas break I'll be able to finish it up.
> >
> > J
> >
> >
> > Mike Eheler wrote:
> >
> >
> > 
>http://sourceforge.net/tracker/index.php?func=detail&aid=495239&group_id=4113&atid=304113
> >
> >>Download the attached file, and run
> >>
> >>patch -p1 -i quanta-2.0.1-php-4.1.0.diff
> >>
> >>That will patch your source tree.. then just configure, make, install.
> >>
> >>I've actually tested this one, so go nuts people. :) Please let me know
> >>if you find any functions that should be keywords or keywords that
> >>shouldn't be keywords, or functions/keywords that just plain aren't in
> >>the list.
> >>
> >>Mike
> >>
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] Passing Logined in Name form One Form to other Page

2001-12-19 Thread Jack

Dear all
I had create the Login Page for the User to login before they can open the
WebPage. What i want to do is to:

When the User had type the Username into the Inputbox, and click the submit
button, this Username will be memorized, and pass to other PHP Page.Then
when he go to some page which need to select data from MYSQL, it will read
the Username which passed from the Login Form and select the only Record to
him!

I heard about the Session, but how i can pass the Username to other page
using Session??

Pls Help!

Thx a lot !
jack
[EMAIL PROTECTED]



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




RE: [PHP] php htpasswd

2001-12-18 Thread Jack Dempsey

not sure i follow...you open it with php do whatever you need and close
it...its just a text file...

-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 1:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php htpasswd


I'm sure question has been asked. How can I edit a htpasswd (apache)
file using a php script? Does anyone have a piece of code? I would like
to see the crypted passwords, but will live without.

Thanks,
J


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



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




RE: [PHP] preg_grep() and limit parameter

2001-12-18 Thread Jack Dempsey

only thing i could think up would be if a user is dealing with huge amounts
of text and only needs to have the first ten returned, returning/continuing
past that would be wastefulnot confident on how often this would really
happen and what the actual difference would be...

Jack

-Original Message-
From: Andrei Zmievski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 12:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP] preg_grep() and limit parameter


Does anyone see a need for a limit parameter to preg_grep() that would
limit the number of array entries returned?

-Andrei
* My wishlist: http://www.amazon.com/exec/obidos/wishlist/2Q2DIPY7BZLSH/ *

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



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




RE: [PHP] htaccess problems

2001-12-17 Thread Jack Dempsey

i don't think you want that space inbetween private/ and .htpasswd

-Original Message-
From: Jeremiah Jester [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 12:38 AM
To: Php-General
Subject: [PHP] htaccess problems


I cant seem to get my htaccess file to work. Can anyone help? Heres what i
have now:

AuthUserFile /var/www/html/private/ .htpasswd
AuthGroupFile /dev/null
AuthName PrivateDomain
AuthType Basic


require valid-user


I then type 'htpasswd -c .htpasswd myusername' and then set password.
Everything seems to be in order but i'm not prompted for user name and
passwd when i try to access protected area via the web? Both htaccess and
htpasswd files are in 'private' directory. Permission on secure folder is
755. Is that right? What about permissions for htaccess and htpasswd files?
Do I have to enable htaccess ability through apache first through
httpd.conf? Can anyone help?

Thansk,
JJ


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



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




RE: [PHP] PHP 4.10: any way to override register_globals = OFF

2001-12-17 Thread Jack Dempsey

i understand that, but if he extracts inside a function, those variables
will be in that scope.
if his auto_prepend file is simply 'extract($_GET)' then that'd be fine as
well

jack

-Original Message-
From: Charles Williams
[mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 5:59 PM
To: Jack Dempsey; Michael Jurgens
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP 4.10: any way to override register_globals = OFF


Jack

$_GET is automatically global to all scopes.  No need to globalize.

chuck

- Original Message -----
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: "Michael Jurgens" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, December 17, 2001 10:49 PM
Subject: Re: [PHP] PHP 4.10: any way to override register_globals = OFF


> a quick and inelegant hack
> 4.1 includes an array that has all of the data sent to the script...(or
use
> the different ones like $_GET etc if need be) then write a globalize
function
> that extracts the vars and declares them global...then use this snippet in
an
> auto_prepend file to magically register the vars
> there's probably a much easier way, including asking your hosting provider
to
> change one little config var...
>
> jack
>
> Michael Jurgens wrote:
>
> > Hi,
> > Now that register_globals is (or will be) OFF by default (just like
> > error_reporting) I'm facing a huge rewrite of existing code if my
hosting
> > provider decides that he wants to upgrade his php (and believe me, he
will
> > use default settings)
> >
> > Is there any way to override register_globals and error_reporing runtime
in
> > your PHP script?
> > (there is no way that I can use .htaccess to override :-((
> >
> > Any help would be much appreciated!
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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



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




RE: [PHP] Newsgroups????

2001-12-17 Thread Jack Dempsey

a preventative measure against spamAFAIK you don't actually have to sign
up for the e-mail list, you just need to give an e-mail address to prove
you're not a spammer.

jack

-Original Message-
From: Eddie Shipman [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 5:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Newsgroups


Just signed up for the mailing list because I couldn't
access the newsgroups, what's going on there?



__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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



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




RE: [PHP] PHP 4.10: any way to override register_globals = OFF

2001-12-17 Thread Jack Dempsey

exactly...in the function you'd have to extract the variables then globalize
them...
or you could loop through the arrays and store the keys and values in the
globals array...that loop should be simple...

jack

-Original Message-
From: Richard Heyes [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 4:54 PM
To: Jack Dempsey; Michael Jurgens
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] PHP 4.10: any way to override register_globals = OFF


> a quick and inelegant hack
> 4.1 includes an array that has all of the data sent to the
> script...(or use
> the different ones like $_GET etc if need be) then write a
> globalize function
> that extracts the vars and declares them global...then use this

Or use extract().

--
Richard Heyes
"If you have any trouble sounding condescending,
find a Unix user to show you how it's done." - Scott Adams


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




Re: [PHP] PHP 4.10: any way to override register_globals = OFF

2001-12-17 Thread Jack Dempsey

a quick and inelegant hack
4.1 includes an array that has all of the data sent to the script...(or use
the different ones like $_GET etc if need be) then write a globalize function
that extracts the vars and declares them global...then use this snippet in an
auto_prepend file to magically register the vars
there's probably a much easier way, including asking your hosting provider to
change one little config var...

jack

Michael Jurgens wrote:

> Hi,
> Now that register_globals is (or will be) OFF by default (just like
> error_reporting) I'm facing a huge rewrite of existing code if my hosting
> provider decides that he wants to upgrade his php (and believe me, he will
> use default settings)
>
> Is there any way to override register_globals and error_reporing runtime in
> your PHP script?
> (there is no way that I can use .htaccess to override :-((
>
> Any help would be much appreciated!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Problem with Code

2001-12-16 Thread Jack Dempsey

1. http://www.php.net/ChangeLog-4.php

2. and yes, you have to specify the exact filename...your issue is that
include_once is not a function in php3, if that code is infact from a php3
file...

"Phillip B. Bruce" wrote:

> Hi,
>
> I have a couple of questions before I get to my problem.
>
>1. Is there any documentation that explains the differences between
> the versions of PHP?
>
>   2. Does it matter when writing php code that you specifiy the file
> name in the following
>manner?  test.php3  test.php4 or whatever.  I'm assumming this is
> version specific.
>
>   My Problem:
>
>I have the following code:
>
> # more headlines*
> 
> include "include_fns.php3";
> include "header.php3";
>
> $conn = db_connect();
>
> $pages_sql = "select * from pages order by code";
> $pages_result = mysql_query($pages_sql, $conn);
>
> while ($pages = mysql_fetch_array($pages_result)) {
>
>   $story_sql = "select * from stories
> where page = '$pages[code]'
> and published is not null
> order by published desc";
>   $story_result = mysql_query($story_sql, $conn);
>   if (mysql_num_rows($story_result)) {
> $story = mysql_fetch_array($story_result);
> print "";
> print "";
> print "";
> if ($story[picture])
>   print "";
> print "";
> print "";
> print "$pages[description]";
> print $story[headline];
> print "";
> print "";
> print "";
> print "";
> print "Read more $pages[code] ...";
> print "";
> print "";
>   }
> }
>
> include "footer.php3";
> ?>
> #
>
> I have the following error:
>
> Fatal error: Call to unsupported or undefined function include_once() in
> include_fns.php3 on line 7
>
> It seems to me that include_once is a legal function but I can't the
> orgination of this funtion other
> than that stupid include_fns.php3 file? Any ideas on this.
>
> Configuration:
>
> OS: Solaris 2.8 10/00 on Intel Hardware.
> Apache: 1.3.9
> PHP: 3.0.15
> mysql: 3.23.46
>
> My ISP is running:
>
> OS: Irix 6.4
> Apache: 1.3.9
> PHP: 3.0.9
> mysql: 3.22.23b
>
> I do appreciate any help on this.
>
> --
> 
> *** Phillip B. Bruce ***
> *** http://pbbruce.home.mindspring.com   ***
> *** [EMAIL PROTECTED]   ***
> ***  ***
> *** "Have you ever noticed? Anybody going slower than***
> *** you is an idiot, and anyone going faster than you***
> *** is a maniac." - George Carlin***
> 
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] now who can help me about cach my query every certain time:(

2001-12-16 Thread Jack Dempsey

Alawi wrote:

> now who can help me about cach my query every certain time:(
> I mean the first user requst the page and php will run query for this first time
>
> after that I want other user to have the result that the first user have it !!
>
> untill the ten minutes end I want the query to run again
>
> this advantge is available in asp and JSP & ColdFusion but not available in PHP why ?

it is possible...search google for "php cache"


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




Re: [PHP] connect to a file outside the web space.

2001-12-15 Thread Jack Dempsey

how exactly do you want to connect to it? if you want to link to it in html, then
it must be under the html doc root...if you're including, then you can specifiy
the path...

Webleycity wrote:

> Hello All
>
> If one creates a file outside the web space on a server. How doe's one
> connect to this from a HTML or PHP page?
>
> As I understand it. It is not as simple as normal html link.
>
> ---
> Mark Webley
> Multimedia design and development
>
> WebleyCity Limited
> London  United Kingdom
>
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> Mobile: 07980 213 627
>
> Fax/Tel: 0208 678 1721
> Pager 07654 581816
> http://www.webleycity.co.uk
> ---
>
> > From: Webleycity <[EMAIL PROTECTED]>
> > Date: Sat, 15 Dec 2001 21:44:22 +
> > To: James Stewart <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> > Subject: Re: [PHP] Need high bandwidth provider for my Asian community site
> >
> > What bandwidth would you like?
> >
> > 
> > | Website design and hosting. |
> > | Your free website trial including design and webspace, contact: |
> > [EMAIL PROTECTED]
> > Visit: http://www.webleycity.co.uk/offers
> > ---
> >
> > WEBLEYCITY CAN DESIGN YOUR WEBSITE TO YOUR EXISTING
> > CORPORATE IDENTITY OR CREATE ONE FOR YOU
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ---
> > Mark Webley
> > Multimedia design and development
> >
> > WebleyCity Limited
> > London  United Kingdom
> >
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> > Mobile: 07980 213 627
> >
> > Fax/Tel: 0208 678 1721
> > Pager 07654 581816
> > http://www.webleycity.co.uk
> > ---
> >
> >
> >
> >
> >> From: James Stewart <[EMAIL PROTECTED]>
> >> Date: Thu, 13 Dec 2001 18:34:31 +
> >> To: [EMAIL PROTECTED]
> >> Subject: Re: [PHP] Need high bandwidth provider for my Asian community site
> >>
> >> On Thursday, December 13, 2001, at 06:14 PM, l0t3k wrote:
> >>> Sunny,
> >>> AFAICR,  is for Netscrape, which apparently cant understand
> >>> 
> >>> for some reason..
> >>
> >> It's not a browser thing...
> >>
> >>  is the correct syntax for a line break in XHTML. All tags must be
> >> closed, hence the / and the white space is necessary to separate the
> >> element name from its closure.
> >>
> >> All major browsers will recognise  but if you want to be XHTML
> >> compliant,  should be used.
> >>
> >> James.
> >>
> >> --
> >> James Stewart
> >> http://www.britlinks.co.uk
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Brain dead - need help!

2001-12-15 Thread Jack Dempsey

use a phpinfo() in one of your pages...that'll show you various places to get
your data...
btw, php does have the $HTTP_GET_VARS that'll have what you want...

jack

Gaylen Fraley wrote:

> I know that I know the answer - it's just buried in the recesses of my mind
> ..
>
> PHP has the various $HTTP_*_VARS arrays.  Is there one to get the
> formliteral pairs from the hyperlinks, as in  href="somepage.php?var1=test">?  I want to extract the $var1 value pair.  I
> know I can do this through javascript, but I want somepage.php to parse and
> use the variable/value.  If there is not an array, then what is the simplest
> way?
>
> Thanks!
>
> --
> Gaylen
> [EMAIL PROTECTED]
> Home http://www.gaylenandmargie.com/
> PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] echo vs. print() performance?

2001-12-13 Thread Jack Dempsey

not as a criticism, but this is among the top 10 questions asked ...or used
to be for a while...anyway, there's tons of info on the mailing lists,
marc.theaimsgroup.com
the short answer is that echo is SLIGHTLY faster being a language construct
rather than a function...then again, i believe i remember someone proving the
opposite...in general, you'll never notice a differenece between the two...

Jon Niola wrote:

> Someone on this list once mentioned a performance difference between using
> echo and print(). Is there any evidence to back this up? I am really
> curious to see if it would make a difference to use one over the other.
>
> --Jon
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Countdown clock?, X days till christmas

2001-12-13 Thread Jack Dempsey

not sure why and how you need mysql for this...why not just do the date
calculation in php?

Webleycity wrote:

> Hello all is it possible to do an interactive countdown clock in MYsql that
> can be embeded in emails.
>
> ---
> Mark Webley
> Multimedia design and development
>
> WebleyCity Limited
> London  United Kingdom
>
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> Mobile: 07980 213 627
>
> Fax/Tel: 0208 678 1721
> Pager 07654 581816
> http://www.webleycity.co.uk
> ---
>
> > From: Mehmet Kamil ERISEN <[EMAIL PROTECTED]>
> > Date: Wed, 12 Dec 2001 14:25:24 -0800 (PST)
> > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > Subject: Re: [PHP] Date
> >
> > what's your raw data. I mean, what is the value of
> > $row["mydatafield"];
> >
> > --- Max <[EMAIL PROTECTED]> wrote:
> >> Hi to all,
> >>
> >> I'm using this to get date from mySQL database:
> >>
> >> ...
> >> $p_datum = $row["mydatefield"];
> >> $mydate = getdate($p_datum);
> >> $month = $mydate['month'];
> >> $mday = $mydate['mday'];
> >> $year = $mydate['year'];
> >>
> >> ..but I allways get 1/1/1970.
> >>
> >> Can anybody help me?
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, e-mail:
> >> [EMAIL PROTECTED]
> >> For additional commands, e-mail:
> >> [EMAIL PROTECTED]
> >> To contact the list administrators, e-mail:
> >> [EMAIL PROTECTED]
> >>
> >
> >
> > =
> > Mehmet Erisen
> > http://www.erisen.com
> >
> > __
> > Do You Yahoo!?
> > Check out Yahoo! Shopping and Yahoo! Auctions for all of
> > your unique holiday gifts! Buy at http://shopping.yahoo.com
> > or bid at http://auctions.yahoo.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] Post Variable Problem

2001-12-13 Thread Jack

Dear all
I had a Form Called Login.php, this form will pass the login Username to
Main.php.

For the Main.php i create a form for user to choose what they want to do
from the List/Menu. Once they had select the choose and press the Option,
the value of the Selected choose will pass back to Main.php to perform some
task.

The step is when Login.php had submitted , the Username ($user) is passed to
Main.php, so in Main.php i had a script

and the below i had a  List Select Menu which let user to Choose what they
want to do. Once they selected , press the Submit button, the form will pass
back to itself! which is "Post=$php_self"". here the problem appear, once it
post back the value to itself, the $user will be gone, which i understand
why, but is there anyway that once the $user had passed to main.php, the
$user's variable will be hold constant in main.php?

I really waiting for your help!

Jack
[EMAIL PROTECTED]



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




RE: [PHP] The "peacock" logo... and others...

2001-12-13 Thread Jack Dempsey

Oh great, I didn't realize there was full book in the making...any ideas
on when the full book will be hitting the shelfs?

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 13, 2001 2:39 PM
To: Jack Dempsey
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] The "peacock" logo... and others...

The full book will have the same bird on the cover.  I'd like to do a
new 
edition of the pocket reference.  (and yes, I will try to get them to
not 
remove the index this time), but O'Reilly wants to get the full book out

before they'll let me do another quick reference.

-Rasmus

On Thu, 13 Dec 2001, Jack Dempsey wrote:

> True...guess everyone's forgotten the ol' pocket manual...
> Any chance a new edition will come out? 
> 
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, December 13, 2001 2:30 PM
> To: Philip Hallstrom
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] The "peacock" logo... and others...
> 
> The O'Reilly animal for PHP is a cuckoo bird.  
> 
> On Thu, 13 Dec 2001, Philip Hallstrom wrote:
> 
> > Not to throw a wrench into the plans and it's not clear that it
really
> > matters, but O'Reilly uses a peacock for an XML book.
> > 
> > http://www.oreilly.com/catalog/xmlnut/
> > 
> > and a pelican for this book.
> > 
> > http://www.oreilly.com/catalog/webclient/
> > 
> > 
> > I suspect that most animals are probably being used by oreilly...
> whether
> > that matters I'll leave up to someone else :)
> > 
> > -philip
> > 
> > 
> > 
> 
> 
> 


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



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




RE: [PHP] The "peacock" logo... and others...

2001-12-13 Thread Jack Dempsey

True...guess everyone's forgotten the ol' pocket manual...
Any chance a new edition will come out? 

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 13, 2001 2:30 PM
To: Philip Hallstrom
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] The "peacock" logo... and others...

The O'Reilly animal for PHP is a cuckoo bird.  

On Thu, 13 Dec 2001, Philip Hallstrom wrote:

> Not to throw a wrench into the plans and it's not clear that it really
> matters, but O'Reilly uses a peacock for an XML book.
> 
> http://www.oreilly.com/catalog/xmlnut/
> 
> and a pelican for this book.
> 
> http://www.oreilly.com/catalog/webclient/
> 
> 
> I suspect that most animals are probably being used by oreilly...
whether
> that matters I'll leave up to someone else :)
> 
> -philip
> 
> 
> 


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



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




RE: [PHP] Can i do this?

2001-12-13 Thread Jack Dempsey

didn't check your code specifically, but you can definitely have arrays
nested inside of arrays...to see how to print them out use something like
print_r to look  at the structure...

-Original Message-
From: Daniel Alsén [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 10:12 AM
To: PHP
Subject: [PHP] Can i do this?


Hi,

can i do this?

$num_vals = array ();
for ($i=0; $i<10; $i++)
{
  $shot_count = "SELECT COUNT(*) FROM statistik WHERE
shooter='$shooter_login' && shot_one = '$i' || shooter='$shooter_login' &&
shot_two = '$i' || shooter='$shooter_login' && shot_three = '$i' ||
shooter='$shooter_login' && shot_four = '$i' || shooter='$shooter_login' &&
shot_five = '$i'";
  $result = mysql_query($shot_count);
  $num_vals[$i] = mysql_fetch_array($result);
}

I guess it´s the last row that is troubling - getting an array into an
array. If the code is good - how do i echo the results?

# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   | +46 8 694 82 22  #
# PGP: http://www.mindbash.com/pgp/  #


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



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




RE: [PHP] Another piece of history, kind of

2001-12-12 Thread Jack Dempsey

"but then again, as things look now, PHP 4.x isn't likely to happen within a
foreseeable time range, if at all."

its good be wrong sometimes :-)

-Original Message-
From: Andrei Zmievski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 10:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Another piece of history, kind of


http://marc.theaimsgroup.com/?l=php-general&m=90719202212123&w=2

-Andrei

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



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




RE: [PHP] RegEx gurus help...

2001-12-10 Thread Jack Dempsey

from the way you describe, i can't help but think that it'd be one hell of a
regex.if all you're doing is stripping out .. i'd load up your fav
editor and do a search and replace where you can approve each changeor,
just change them all and fix what's broken.it'll be much quicker than
trying to write a regex for all of that

-Original Message-
From: Brian V Bonini [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 9:22 AM
To: PHP Lists
Subject: [PHP] RegEx gurus help...


I need to replace all relative links in an html
doc with absolute links on the fly weather it
be an image link,



a URL,


a link to an external JS file


or external css file.


Anyone done this before and have a prefab regex laying
around they want to share?

-Brian


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



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




RE: [PHP] Running WML (WAP services) under PHP

2001-12-09 Thread Jack Dempsey

i think that php sends out headers showing that the page is html.not
sure bout this, but you might have to send a diff header..

-Original Message-
From: M [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 09, 2001 5:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Running WML (WAP services) under PHP


Hello, I am trying to develop some WML apps using PHP.
To run WML apps into my local Apache (win98) server, I added

AddType application/x-httpd-php .wml

into httpd.conf. This works ok when calling directly from netscape
http://localhost/mywml.wml ,
treating script like a true PHP program.

BUT when writing a REAL WML app. (cards and so) and trying to run on
NOKIA simulator (by calling URL), it shows a parse error on line 1 (for
all scripts).
The same script, when executed in file mode on NOKIA sim (that is first
load .wml file and then press SHOW button) , works fine, proving the
error is not in script, but in way PHP interpret .WML pages.

I suspect PHP introduces some invisible code (just 1 byte?) or something
at beginning of .WML page.


Thanks for your attn.

Miguel



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



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




RE: [PHP] Comparing Dates

2001-12-08 Thread Jack Dempsey

you could pass the values to mktime and compare

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 08, 2001 8:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Comparing Dates


I'm trying to do a check on a date, to see if it's after the current date,
so basically i'm doing an

if(date("d-m-y")>"15-12-01") { do something }

I know that's obviously not the right way to do it, but can someone help me
out?


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




RE: [PHP] How to compute time to load page...

2001-12-08 Thread Jack Dempsey

the search time is different than the page load timegoogle for example
can find thousands of records in a tenth of a second, yet it takes longer to
get that html result back to your browseryou could estimate page
download time by calculating the filesize and using the connection
speedcertainly not 100% accurate, but it will give you a way of
estimating.

jack

-Original Message-
From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 08, 2001 7:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to compute time to load page...


Hi All... (again)

I was just wondering if anyone out there has made a function that will
compute how long time (seconds, milliseconds) it will take to load a page?

I see some search engines have a function that displays how long time the
search took, and I'm looking for the same thing, to compare different
designs and improve loading time for my "viewers".

Anyone?
- Torkil Johnsen


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



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




RE: [PHP] simple regexp question - validating new line chars

2001-12-08 Thread Jack Dempsey

that's because you're testing to see if '\n' is "\n"...single quotes mean:
interpret the text between literally, so '\n' is a backslash followed by
n...doulbe quotes mean: interpolate the value, so \n becomes a newline...

-Original Message-
From: Krzysztof Jarecki [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 08, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] simple regexp question - validating new line chars


Hi everyone:)

I need to validate a string that comes from a submitted form.
There's nothing unusual in it... but the problem part showes up, when I
need to validate a new line character...
I have tried many diffrent variations of the code and I have
ended up on something VERY simple:



Unfortunately this script results with "error" ;(
Does somebody know how to make this regexp to work?
Maybe it is a bug?
I am using php 4.0.6 on windows 2000.

I will appreciate any feedback about this ;)

Chris Jarecki



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



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




RE: [PHP] Reg ex help-Removing extra blank spaces before HTML output

2001-12-06 Thread Jack Dempsey

cool, glad you got it working...if you think there's a bug with using / and
| you might want to see if you can replicate the problem, and if its really
a bug, submit it...my guess is that it was just a typo or something

jack

-Original Message-
From: Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 5:13 PM
To: Jack Dempsey; PHP list
Subject: RE: [PHP] Reg ex help-Removing extra blank spaces before HTML
output


OK, this time the \n worked.  The only thing I changed was using /
delimiters instead of | delimiters in the search string.  No idea if/why
that would affect anything in the replacement string.

Anyway, I finally came up with exactly what I wanted:
preg_replace(array("/\s*\n+\s*/", "/[ ]+/"), array("\n", " "), $input);

All padding (defined as any series of spaces, newlines and sometimes tabs)
is removed from $input, but always leaving at least a space or a newline in
its place.  If there were any newlines in the "padding", then a newline is
left.  If there weren't, then a space is left.

Thanks for the help!

Ken
[EMAIL PROTECTED]

At 04:40 PM 12/6/01 -0500, Jack Dempsey wrote:
>one call to preg_replace...if you check out php.net/preg_replace, you'll
see
>what i mean...use arrays...
>and as long as you have them ordered in the right way, it'll execute them
in
>that order, so by the time the \s replace comes up all your 'bbbnbb' will
be
>fixed...problem then is that those newlines would get caught by the \s and
>get switched to spaces...so, if you want them to stay, then use [ ] to
>represent a space instead of \s...might want [ \t] to catch tabs as well...



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




RE: [PHP] Reg ex help-Removing extra blank spaces before HTML output

2001-12-06 Thread Jack Dempsey

second issue first:
one call to preg_replace...if you check out php.net/preg_replace, you'll see
what i mean...use arrays...
and as long as you have them ordered in the right way, it'll execute them in
that order, so by the time the \s replace comes up all your 'bbbnbb' will be
fixed...problem then is that those newlines would get caught by the \s and
get switched to spaces...so, if you want them to stay, then use [ ] to
represent a space instead of \s...might want [ \t] to catch tabs as well...
first issue: hard to see whats going on, but check your syntax. i just ran
this;
$text = "this is some text with a newline in it right here \n  there it
was";
echo $text;
echo '';
echo preg_replace("/[ ]+\n+[ ]+/","\n",$text);
and it made the substitution fine.

jack

-Original Message-
From: Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 1:56 PM
To: Jack Dempsey
Subject: RE: [PHP] Reg ex help-Removing extra blank spaces before HTML
output


At 11:41 AM 12/6/01 -0500, Jack Dempsey wrote:
>using "\n" as your replacement text will do ithowever, if you want a
>newline in the html, then you'll want ...

Using "\n" (either in single or double quotes) resulted in actual 'backslash
n' being all over my output, instead of newlines.  Hence, my inquiry.

>your first pattern will be "/[ ]+\n+[ ]+/" with a replacement of a single
>newline...then the second will be the previous regex.check out php.net
>for help with syntax and using arrays with preg_* functionsthe first
>should catch all situations of a series of spaces [with at least one
newline
>in between them] and substitute a newline.

Thanks, sounds about right.  The second pattern (which sometimes includes
getting rid of newlines) won't clobber the results of the first pattern?
And are you suggesting two separate calls to the preg* function?  It sounds
like you are, if each of the two patterns also has a unique replacement
string.

Thanks a lot!

- Ken
[EMAIL PROTECTED]

>check out mastering regular expressions as well.....its worth the money
>jack
>
>-Original Message-
>From: Ken [mailto:[EMAIL PROTECTED]]
>
>At 02:43 PM 12/5/01 -0500, Jack Dempsey wrote:
> >$t = preg_replace('/\s+/',' ',$text);
>
>One more thing:
>How do I replace with newline instead of a space?  I read through the
>manuals but couldn't grasp how to do this.  \n didn't cut it.
>
>And, more advanced -
>The above replaces any groups of 2 or more blanks (newlines, spaces, tabs)
>with a single blank.
>Is there an easy way to replace them with EITHER a space or a newline,
>depending on whether any newlines were present in the input?
>I.e. bb would be replaced with b, but bnbn would be
>replaced with n.



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




RE: [PHP] Reg ex help-Removing extra blank spaces before HTML output

2001-12-06 Thread Jack Dempsey

using "\n" as your replacement text will do ithowever, if you want a
newline in the html, then you'll want ...

and as far as the advanced replace, make an array of search patterns, in
this case two.
your first pattern will be "/[ ]+\n+[ ]+/" with a replacement of a single
newline...then the second will be the previous regex.check out php.net
for help with syntax and using arrays with preg_* functionsthe first
should catch all situations of a series of spaces [with at least one newline
in between them] and substitute a newline.
check out mastering regular expressions as well.its worth the money
jack

-Original Message-
From: Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 3:08 AM
To: Jack Dempsey; liljim; PHP list
Subject: RE: [PHP] Reg ex help-Removing extra blank spaces before HTML
output


At 02:43 PM 12/5/01 -0500, Jack Dempsey wrote:
>$t = preg_replace('/\s+/',' ',$text);

One more thing:
How do I replace with newline instead of a space?  I read through the
manuals but couldn't grasp how to do this.  \n didn't cut it.

And, more advanced -
The above replaces any groups of 2 or more blanks (newlines, spaces, tabs)
with a single blank.
Is there an easy way to replace them with EITHER a space or a newline,
depending on whether any newlines were present in the input?
I.e. bb would be replaced with b, but bnbn would be
replaced with n.

Right now the issue is that I'm sometimes getting results that have no line
breaks for a really long time, and I know there are reasons to try to avoid
individual lines of HTML longer than 200 characters.

Thanks!

- Ken
[EMAIL PROTECTED]


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



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




RE: [PHP] Reg ex help-Removing extra blank spaces before HTML output

2001-12-05 Thread Jack Dempsey

actually it does... james' solution will work but I forgot to mention a
\s is whitespace, not a space, therefore it will get tabs, newlines, and
spaces. look at http://www.cs.tut.fi/~jkorpela/perl/regexp.html
" \s matches any whitespace character (space, tab, newline)"
therefore my suggestion works: 
$t = preg_replace('/\s+/',' ',$text);
its quicker to code, easier to understand, and will run faster because
it doesn't have to match and remember or do alternation...

jack

-Original Message-
From: Ken [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 05, 2001 2:01 PM
To: Jack Dempsey
Subject: RE: [PHP] Reg ex help-Removing extra blank spaces before HTML
output

At 10:57 AM 12/5/01 -0500, Jack Dempsey wrote:
>a space (\s is from perl)

Ah, OK, yours doesn't deal with newlines.

 From list member "James", a solution that does:

-
From: "liljim" <[EMAIL PROTECTED]>

The example Jack gave you will clear up spaces well, though to get both
newlines and spaces into one:

$input = preg_replace("/([ ]|\n){1,}/", "\\1", $input);
-

Thanks again!

- Ken
[EMAIL PROTECTED]



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




RE: [PHP] Reg ex help-Removing extra blank spaces before HTML output

2001-12-05 Thread Jack Dempsey

true...he didn't mention newlines though so i left those out...also, "since
PHP 4.0.4 $n [meaning $1], being the preferred one." you also don't need
double quotes and since + means 1 or more, i'd save myself some typing
$input = preg_replace('/(\s|\n)+/',"$1",$input);
of course since you're now matching and replacing it'll take longer than a
straight substitution, although i doubt the files you're scanning are big
enough to notice

jack

-Original Message-
From: liljim [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 5:18 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Reg ex help-Removing extra blank spaces before HTML
output


Hello,

The example Jack gave you will clear up spaces well, though to get both
newlines and spaces into one:

$input = preg_replace("/([ ]|\n){1,}/", "\\1", $input);

James

"Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> $text = preg_replace('|\s+|',' ',$text);
>
>
> -Original Message-
> From: Ken [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 05, 2001 2:06 AM
> To: PHP list
> Subject: [PHP] Reg ex help-Removing extra blank spaces before HTML
> output
>
>
> I want to remove all superfluous blank spaces before I sent my HTML
output,
> to make the output smaller.
>
> So I'd like to take $input, replace any number of blank space or newlines
> that are consecutive and replace them with a single blank.
>
> I.e. I will list a blank space as b and a newline as n:
>
> If input is: bTEXTHEREbbbnnnbnMOREbEVENMORE
> Then output should be: bTEXTHEREbMOREbEVENMORE
>
> I imagine this would be handled by a simple regular expression call, but
I'm
> no pro with them yet.
>
> Any help?
>
> Thanks,
> Ken
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>



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



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




RE: [PHP] Reg ex help-Removing extra blank spaces before HTML output

2001-12-04 Thread Jack Dempsey

$text = preg_replace('|\s+|',' ',$text);


-Original Message-
From: Ken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 2:06 AM
To: PHP list
Subject: [PHP] Reg ex help-Removing extra blank spaces before HTML
output


I want to remove all superfluous blank spaces before I sent my HTML output,
to make the output smaller.

So I'd like to take $input, replace any number of blank space or newlines
that are consecutive and replace them with a single blank.

I.e. I will list a blank space as b and a newline as n:

If input is: bTEXTHEREbbbnnnbnMOREbEVENMORE
Then output should be: bTEXTHEREbMOREbEVENMORE

I imagine this would be handled by a simple regular expression call, but I'm
no pro with them yet.

Any help?

Thanks,
Ken
[EMAIL PROTECTED]

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



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




RE: [PHP] problem with ImageCreateJPEG ...

2001-12-04 Thread Jack Dempsey

also, are you sure both versions of php were compiled the same way with the
same options and support?

-Original Message-
From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 04, 2001 9:22 AM
To: Miguel Loureiro; [EMAIL PROTECTED]
Subject: Re: [PHP] problem with ImageCreateJPEG ...


>
>
>sorry for taking your time, but I still dont understand why I got errors
with
>pjeg...
>I use the following code on other machine with jpeg support to , and it
works,
>while in my machine I got an empty jpeg file
> Header("Content-type: image/jpeg");
> $im=ImageCreate(400,200);
> $bcg  = ImageColorAllocate($im,240,240,240);
> $prt  = ImageColorAllocate($im,0,0,0);
> $rd   = ImageColorAllocate($im,255,0,0);
> ImageFill($im,400,200,$bcg);
> ImageLine($im,110,85,280,85,$rd);
> ImageString($im,5,130,90,"--- OK ---",$prt);
> ImageLine($im,110,110,280,110,$rd);
> ImageJPEG($im,"a.jpg");
>?>
>
>
>
>
>
>
Try to remove all html, and instead make a ImageJPEG($img);

You should then only get the JPEG file?

You set a header, and the browser doesn't understand the HTML...

regards
Johan


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



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




RE: [PHP] php without the php.ini

2001-11-30 Thread Jack Dempsey

are you sure its not there? where does phpinfo say its located? its really
not there?
hmm...i'm not sure, but php might just use its own internal defaults without
a php.ini present, but i thought it was needed..who knows......

jack

-Original Message-
From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 7:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php without the php.ini


Hi,
How can PHP work without the php.ini file? I have tried to find the php.ini
file on a RAQ3, to no success. Looking at the php info and then looking at
the system directories doesnt yield anything.
The same goes with a server running the Plesk control panel.

Any ideas on how this is done?
Regards,
Kunal Jhunjhunwala


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



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




RE: [PHP] Array Help

2001-11-27 Thread Jack Dempsey

you can just kept adding []'s

$var["category"]["subcategory"]["Item"] = "url";

-Original Message-
From: Brian V Bonini [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 27, 2001 4:56 PM
To: PHP Lists
Subject: [PHP] Array Help


How can I access the inner most info in this array?
Ie, Item and url

$var = array(
 "category"  => array(
  "subcategory"  => array(
"Item" => "url"
),
 )
);

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



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




Re: [PHP] Display Problemo

2001-11-20 Thread Jack Dempsey

1. what do you want the  tags to be? a simple str_replace('','',$text)
will strip the tags...
2. use  html text 

jack

Lerp wrote:

> I have a small php app that I'm building to display, insert, edit, etc...
> various types of code snipits (asp, php, html, etc...) in a db. I also have
> a download option that creates a text file with the code that they've
> selected.
>
> I have 2 problems...the first is that when I go to view the text file I have
> all sorts of  tags within the text, this is due to the nl2br function I
> used prior to the db insertion. How would I get rid of those?
>
> The seond problem is when a user goes to view an html code example on the
> webpage, say with
> a hyperlink, the hyperlink is made active replacing the code with the actual
>  tag.
>
> Thx in advance, Lerp
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] schedule a task

2001-11-19 Thread Jack Dempsey

you need some way of automating the process, and without cron automatically
doing things for you, you're going to be pressed for a solution...i'm not
sure what you could do because you need something to do this
automatically...your host doesn't provide perl scripts to be cronned or
anything like that? if not, i'm not sure what to tell you...

jack
- Original Message -
From: "Gab" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 3:32 PM
Subject: Re: [PHP] schedule a task


> thanks for a quick response but I have a major problem with that:
> no shell access => can't use cron
>
> Any other idea?
> Gab
>
>
> "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
> 005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
> > cron either a php script itself [if you've got it installed as a cgi] or
a
> > lynx request of the page
> > check the archives as well [marc.theaimsgroup.com] because this comes up
> > every week or so
> >
> > - Original Message -
> > From: "Gab" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, November 19, 2001 3:15 PM
> > Subject: [PHP] schedule a task
> >
> >
> > > Hi,
> > >
> > > I have a form (POST method), that creates a back-up of a MySQL
database
> as
> > > an SQL file when submited. I am looking for a way to automate this
task
> > (ie
> > > on a daily basis at midnight).
> > > Any idea on how to do it in PHP? (if it is possible)
> > >
> > > Thanks
> > >
> > > Gab
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] schedule a task

2001-11-19 Thread Jack Dempsey

cron either a php script itself [if you've got it installed as a cgi] or a
lynx request of the page
check the archives as well [marc.theaimsgroup.com] because this comes up
every week or so

- Original Message -
From: "Gab" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 3:15 PM
Subject: [PHP] schedule a task


> Hi,
>
> I have a form (POST method), that creates a back-up of a MySQL database as
> an SQL file when submited. I am looking for a way to automate this task
(ie
> on a daily basis at midnight).
> Any idea on how to do it in PHP? (if it is possible)
>
> Thanks
>
> Gab
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] PHP Backing up a Database?

2001-11-17 Thread Jack Dempsey

mysqldump
check it out, either man or google
then ftp that file down, load it wherever, and mysql database < dump.sql 

jack

-Original Message-
From: cosmin laslau [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 17, 2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Backing up a Database?


Hi,

Say I'm not really confident in the prowess of my server, and I want to 
download my database onto my computer. Can that be done? What can I look 
(FTP access) in the directory structure. I guess, where is it usually 
located?

Thanks.

Cosmin Laslau

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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



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




RE: [PHP] Converting dates?

2001-11-17 Thread Jack Dempsey

search the archives there are tons of messages dealing with date
manipulation.
basically take the timestamps find the difference in seconds, convert to
days, etc

jack

-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 17, 2001 3:17 PM
To: PHP is not a drug.
Subject: [PHP] Converting dates?


I am storing a birthdate in my database as a Unix timestamp but when I
display it I want to calculate the different between that date and todays
date and display the persons age.

How can I do that with PHP?

I also want to know if it is currently their birthday.  So trying to set
$isbday to yes if todays month and day are the same as their birthdate in
the database.

Jeff


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



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




Re: [PHP] Difference of queries in PHP/mySQL?

2001-11-17 Thread Jack Dempsey

are you actually doing anything with $request? that just gets a mysql result
back in a variable, you then have to extract the data from it...

Jeff Lewis wrote:

> I am wondering if there are any difference between using PHP and using the
> command line for mySQL.  Entering this at the comman line returns all the
> membergroups properly.  When I use this in my PHP program, it doesn't
> continue past this line:
>
> $request = mysql_query("SELECT membergroup FROM membergroups WHERE 1 ORDER
> BY ID_GROUP");
>
> Jeff
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] mirrors?

2001-11-16 Thread Jack Dempsey

has anyone tried selecting a mirror php site from the drop down at the
bottom-right? i just tried brazil and bulgaria and it seems to be broken in
general...


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




[PHP] os x server and php version > 4.0b2

2001-11-16 Thread Jack Dempsey

I've been meaning to upgrade and finally feel like I have to bite the
bullet. However, I can't find much information on OS X Server and a version
of php more recent than 4.0b2 which is what I'm currently running. Can
anyone provide some links or their configure line?

thanks,
Jack


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




RE: [PHP] Regular expressions?

2001-11-16 Thread Jack Dempsey

If you'd really like to develop your regex skills, and everyone should,
pickup Mastering Regular Expressions by Jeffrey Friedl(O'Reilly Press). Its
the best out there, and will probably teach you more than you thought
possible.

Jack

-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 16, 2001 2:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Regular expressions?


Hello!

I need to search for strings between html-tags. For example, I need to
know if the String "Searchstring" is between "" and ""
(case-insensitive).

How is it done?

I think I need regular expressions, but I have no idea about it. I'm not
getting to clever out of the php-documentaion. Where can I start to
learn reg-exp? Should I use the ereg- oder preg-functions? Help!

Martin



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



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




RE: [PHP] Re: Can If Else statements be split into code blocks??

2001-11-13 Thread Jack Dempsey

David's correct. The reason it wasn't working for you is that you didn't put
braces around the code you wanted executed in the if statement. Also, to
output large chunks of html in a simple manner with variables included, look
into "here docs". They look like this:


echo< Ok, I figured out that just using echo seems to be the best way to do
> this under PHP.  In ASP, you can end your code block and start in with
> HTML, but I couldn't get that to work with PHP.  However, I was able to
> just use the echo statement to get the conditional HTML I wanted to
> show up when the proper condition was met in the If Else statement.
>
> Brad
>
> "Brad Melendy" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > Hello,
> > I'm trying to execute some HTML in an IF ELSE statement.  I'm trying
> > something like:
> >
> >  > if (strstr($DomResults,$Match))
> > print "Congratulations!  $domain.$suffix is available!";
> > ?>
> > 
> >   
> > 
> >
> >  >else
> > print "Sorry, $domain.$suffix is already taken.";
> > ?>
> >
> > Basically, it works great without the form I'm trying to insert, but
> > with the form after the IF statement, it fails.  Is what I want to do
> > against
>
> the
>
> > rules?  I'm converting an ASP script I have to PHP and I have it all
>
> working
>
> > under ASP.  That means it should be eaiser with PHP right?  ;-)
> > Thanks in advance.
> >
> > ...Brad

You can drop in and out of php parsing, even in a control structure. So
something like


That

The Other


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

   Stop talking! I'm out of aspirin!

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



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




RE: [PHP] cron not allowed

2001-11-13 Thread Jack Dempsey

thanks jonwas more of a 'how are you going to' rather than 'how is it
possible' :-)
either way, from lynx or from php being a cgi a simple shell script or perl
script should be able to make the appropriate call...

jack

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 9:29 AM
To: 'Jack Dempsey'; [EMAIL PROTECTED]
Subject: RE: [PHP] cron not allowed


> how did you plan on running php from cron?

Well, this works for me:

0 3 * * * lynx -dump http://mysite.com/mypage.php > /dev/null

HTH
Jon


**
'The information included in this Email is of a confidential nature and is
intended only for the addressee. If you are not the intended addressee,
any disclosure, copying or distribution by you is prohibited and may be
unlawful. Disclosure to any party other than the addressee, whether
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**

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



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




RE: [PHP] cron not allowed

2001-11-13 Thread Jack Dempsey

how did you plan on running php from cron? however you do that you could run
a perl script that just makes a system call and does the same thing

-Original Message-
From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 9:04 AM
To: Php-General
Subject: [PHP] cron not allowed


I have a php script I'd like to run at regular intervals, but my isp will
not set a cron job for it but will for a perl script

Is there anyway round tis, or does anyone one know of a perl script that
might then execute the php script if I can get that to be automated?

thanks



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



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




<    1   2   3   4   5   6   7   >