[PHP-DB] Re: Dreamweaver as PHP editor

2003-12-02 Thread Philippe Saladin
you could name your files *.inc.php
- DW would see them as php files
- and it can be safer (look if an internaut asks for the url
www.yoursite.com/config.inc : he will see the source code...)

Regards,

Philippe


Susi Sloan [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
 I'm just getting into PHP, and have found that as a PHP code editor,
 Dreamweaver works pretty well (with the extension I installed). My
question
 is this, whenever I save an include file with the .inc extension, all of
the
 color coding goes away, as does the PHP tab on the tool bar. Is there any
 way to make Dreamweaver see a .inc file as a PHP file? I looked on all the
 menus and in the preferences, but I couldn't find an obvious way to do
this.

 Thanks!
 Susi Sloan
 ___
 GRASS ROOTS SOFTWARE
 350 Crown Point Circle, Suite 225
 Grass Valley, CA 95945
 1-877-274-7277

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



[PHP-DB] Fake BDD

2003-12-02 Thread BENARD Jean-philippe
Hi,

We use ORACLE DataBase for all our projects and we can't install
mysql/postgresql on our server. A new project needs a little database (only
1 table). I heard about something like an API in order to use text files in
place of real database system and that we could use SQL query to return
results. Does someone know this tool and could help us?

Many thanks in advance.

(o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10

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



[PHP-DB] Re: Downloading PHP source from a PHP

2003-12-02 Thread JeRRy
To: [EMAIL PROTECTED] 
From: Kim Steinhaug [EMAIL PROTECTED] 
Date: Mon, 1 Dec 2003 22:48:00 +0100 
Subject: Re: Downloading PHP source from a PHP
filename, possible? 


What you do is, if my logic is correct...

Read the entire file in to a variable and send it back
to
the browser with another header information, typicall
TEXT.

Just like the force download method for a PDF file, or
other
files. This should work very well.

-- 
Kim Steinhaug

Hi Kim,

Do you have an example to show?  ( if possible test it
to see if it works :) )

J

http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.

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



[PHP-DB] phpMyAdmin produces error on PHP

2003-12-02 Thread Andy Levy
I am using Red Hat 9 which comes with PHP.  

I have installed mySQL and tested it from terminal - it seems to be working fine.  I 
am very new to Linux though.

phpMyAdmin is producing the following error message from the browser 

cannot load MySQL extension,
please check PHP configuration.
DOCUMENTATION (link)

I have checked the documentation, and it says to install a package called PHP-MySQL.   
 I have downloaded this and (i think) installed it.  But the error message remains.  I 
am not that great with Linux - so any help you can provide will be very appreciated.  

Thank you 

Andy

[PHP-DB] Re: Extra blank lines bomb fgetcsv function

2003-12-02 Thread David Robley
In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 Here is the beginning of a big loop that loads a line at a time from an uploaded 
 textfile and then runs validation on each field:
  
 
 //loop through the rows putting the fields into an array
 
 while ($fieldarray = fgetcsv ($handle, $userfile_size, ,)) {
  
  
 The problem I am having is that when there is an empty line at the bottom of the txt 
 file, my validation tells me it is a bad line, and rejects the file. Is there anyway 
 of stopping the loop, or trimming the file of empty lines? Hope I've explained my 
 problem correctly.

According to the docs, A blank line in a CSV file will be returned as an 
array comprising a single null field, and will not be treated as an 
error. So I imagine you need to apply your validation only where the 
array != a single null field.

Cheers
-- 
Quod subigo farinam

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

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



[PHP-DB] Re: Go to detail page...problem

2003-12-02 Thread David Robley
In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 Hi,
 I'm doing a PHP MySQL website with Dreamweaver MX, and I'm not much of a
 coder myself.
 The problem that I have is that when I create the recordset for the detail
 page, all the elements in the master page link to the same field in the
 detail page (which is the first one of the table).
 What's wrong?
 Thanks in advance
 Dario
 

Without seeing some code, it's not possible to give a useful answer. 
Perhaps if you could post the snippet of code that causes the problem?


-- 
Quod subigo farinam

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

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



Re: [PHP-DB] Fake BDD

2003-12-02 Thread Gary Every
Check out SQLite

BENARD Jean-philippe wrote:

Hi,

We use ORACLE DataBase for all our projects and we can't install
mysql/postgresql on our server. A new project needs a little database (only
1 table). I heard about something like an API in order to use text files in
place of real database system and that we could use SQL query to return
results. Does someone know this tool and could help us?
Many thanks in advance.

   (o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
  Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10
 

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


Re: [PHP-DB] multiple queries

2003-12-02 Thread Gary Every
Or do the same with the BETWEEN keyword:

SELECT * FROM dates WHERE store='$store' AND date BETWEEN DATE_SUB(now(),
interval 3 day) AND DATE_ADD(now(), interval 3 day)


Richard Davey wrote:

Hello Cameron,

Tuesday, December 2, 2003, 1:08:19 AM, you wrote:

CS $sql = SELECT * from dates where store=$store and date=$date;

CS ultimately I would like to display data for 3 days on either side of
CS this.   

The following is un-tested, but a quick look over the MySQL manual
should firm this up for you:
SELECT * FROM dates WHERE store='$store' AND date  DATE_SUB(now(),
interval 3 day) AND date  DATE_ADD(now(), interval 3 day)
 

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


Re: [PHP-DB] Fake BDD

2003-12-02 Thread John Krewson
Perhaps this is what you were referring to?
http://www.c-worker.ch/txtdbapi/index_eng.php
Then there is SQLite, http://php.net/manual/en/ref.sqlite.php.  I've 
seen several tutorials out there regarding using SQLite, and it will 
probably become quite popular after PHP 5+ becomes everyone's favorite 
version.

Or, one could retrieve data from a remote mysql/postgresql database as well.

Perhaps someone has used either/both of my first two suggestions?  I'm 
rather curious about how easy PHP-TextDB API is to work with.

Best of luck,
John
BENARD Jean-philippe wrote:

Hi,

We use ORACLE DataBase for all our projects and we can't install
mysql/postgresql on our server. A new project needs a little database (only
1 table). I heard about something like an API in order to use text files in
place of real database system and that we could use SQL query to return
results. Does someone know this tool and could help us?
Many thanks in advance.

   (o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
  Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10
 

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


[PHP-DB] MS Access, FoxPro and PHP

2003-12-02 Thread Robert Twitty
Is anyone using MS Access, FoxPro or any other file-based database via
ODBC with PHP?

-- bob

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



[PHP-DB] Fonction timer

2003-12-02 Thread Michel GUIRAUDOU

Bonjoour la liste,

J'ai regardé la doc php, et je n'ai pas trouvé de fonction timer.
Je souhaite lancer un timer à l'expiration duquel j'exécuterai un programme.
Est ce possible? Y a t'il des fonctions ou des morceaux de programme
facileme à reprendre
 pour faire ça?

Merci pour votre aide,

 Message Classification:
 [X] General Public Use
 [ ] Motorola Internal Use Only
 [ ] Motorola Confidential Proprietary

Michel GUIRAUDOU

MOTOROLA LABS
(RASSEL) Radio Access System and Spectrum   Engineering Lab

Parc Les Algorithmes
   91193 Gif sur Yvette Cedex

Tel: 33.(0)1.69.35.48.23
Fax: 33.(0)1.69.35.25.01

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



[PHP-DB] FW: Fonction timer

2003-12-02 Thread Michel GUIRAUDOU


Bonjour la liste,

J'ai regardé la doc php, et je n'ai pas trouvé de fonction timer.
Je souhaite lancer un timer à l'expiration duquel j'exécuterai un programme.
Est ce possible? Y a t'il des fonctions ou des morceaux de programme
facileme à reprendre
 pour faire ça?

Merci pour votre aide,

 Message Classification:
 [X] General Public Use
 [ ] Motorola Internal Use Only
 [ ] Motorola Confidential Proprietary

Michel GUIRAUDOU

MOTOROLA LABS
(RASSEL) Radio Access System and Spectrum   Engineering Lab

Parc Les Algorithmes
   91193 Gif sur Yvette Cedex

Tel: 33.(0)1.69.35.48.23
Fax: 33.(0)1.69.35.25.01

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



RE: [PHP-DB] MS Access, FoxPro and PHP

2003-12-02 Thread howard gramer
Robert,

I can not help directly but until you get a helpful response here you could 
try a Google Groups search.

http://groups.google.com/groups?safe=imagesie=UTF-8oe=UTF-8as_ugroup=*access*as_usubject=php%20odbclr=hl=en

Go to http://groups.google.com
click on Advanced search
for Newsgroup enter: *access*
Subject enter: php odbc
howard grämer
 New York City
  [EMAIL PROTECTED]




From: Robert Twitty [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MS Access, FoxPro and PHP
Date: Tue, 2 Dec 2003 09:55:08 -0500 (EST)
Is anyone using MS Access, FoxPro or any other file-based database via
ODBC with PHP?
-- bob
_
Share holiday photos without swamping your Inbox.  Get MSN Extra Storage 
now!  http://join.msn.com/?PAGE=features/es

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


[PHP-DB] user input killing code

2003-12-02 Thread redhat
I am still working on this DB entry page.  I have a sort of content mgt
page that I have built where certain company people input data to be
displayed on a web page to be viewed by the public.  Everything is
working great except, when someone enters an ' or  into the form field
it will not update the database.  I figured out that if you escape the '
or  with \ it will go through.  I would like to know what I can do to
my code to keep users from having to remember this.  Any suggestions?
thanks,
DF

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



RE: [PHP-DB] user input killing code

2003-12-02 Thread Hutchins, Richard
addslashes($userInput)

Rich

 -Original Message-
 From: redhat [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 10:49 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] user input killing code
 
 
 I am still working on this DB entry page.  I have a sort of 
 content mgt
 page that I have built where certain company people input data to be
 displayed on a web page to be viewed by the public.  Everything is
 working great except, when someone enters an ' or  into the 
 form field
 it will not update the database.  I figured out that if you 
 escape the '
 or  with \ it will go through.  I would like to know what I can do to
 my code to keep users from having to remember this.  Any suggestions?
 thanks,
 DF
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



Re: [PHP-DB] Fonction timer

2003-12-02 Thread Ignatius Reilly
PHP est un langage de programmation, pas un daemon.

Le plus simple est de créer des tâches automatisées qui exécutent des
scripts PHP.
Sous Windows 2000 c'est très facile: Scheduled Task  Command prompt 
(terminer)
Ensuite tu édites la scheduled task: Properties  Run  c:/php/php.exe
c:/tasks/myscript.php

HTH
Ignatius
_
- Original Message -
From: Michel GUIRAUDOU [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 16:09
Subject: [PHP-DB] Fonction timer



 Bonjoour la liste,

 J'ai regardé la doc php, et je n'ai pas trouvé de fonction timer.
 Je souhaite lancer un timer à l'expiration duquel j'exécuterai un
programme.
 Est ce possible? Y a t'il des fonctions ou des morceaux de programme
 facileme à reprendre
  pour faire ça?

 Merci pour votre aide,

  Message Classification:
  [X] General Public Use
  [ ] Motorola Internal Use Only
  [ ] Motorola Confidential Proprietary

 Michel GUIRAUDOU

 MOTOROLA LABS
 (RASSEL) Radio Access System and Spectrum Engineering Lab

 Parc Les Algorithmes
91193 Gif sur Yvette Cedex

 Tel: 33.(0)1.69.35.48.23
 Fax: 33.(0)1.69.35.25.01

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



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



[PHP-DB] Re: user input killing code

2003-12-02 Thread Peter
You can use the function addslash() before you insert the input in the
database.
When you read data from de database, you can use the function
stripslashes(), to display the text correctly.

see also:
http://www.php.net/manual/nl/function.addslashes.php
and
http://www.php.net/manual/nl/function.stripslashes.php

Peter

Redhat [EMAIL PROTECTED] schreef in bericht
news:[EMAIL PROTECTED]
 I am still working on this DB entry page.  I have a sort of content mgt
 page that I have built where certain company people input data to be
 displayed on a web page to be viewed by the public.  Everything is
 working great except, when someone enters an ' or  into the form field
 it will not update the database.  I figured out that if you escape the '
 or  with \ it will go through.  I would like to know what I can do to
 my code to keep users from having to remember this.  Any suggestions?
 thanks,
 DF

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



Re: [PHP-DB] Fonction timer

2003-12-02 Thread Ivan Fomitchev
Hello Michel,

MG J'ai regard la doc php, et je n'ai pas trouv de fonction timer.
MG Je souhaite lancer un timer  l'expiration duquel j'excuterai un programme.
MG Est ce possible? Y a t'il des fonctions ou des morceaux de programme
MG facileme  reprendre
MG pour faire a?

 ! , ,   .
time  microtime (  ,  
 ).

MG Merci pour votre aide,

.

-- 
Best regards,
 Ivan  mailto:[EMAIL PROTECTED]

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



[PHP-DB] Redirect.

2003-12-02 Thread gfmb
Hi all,
I have a problem.How can I redirect from a PHP script to another script in asp, php or 
a HTML page? 
This script redirect to another script in function of the values of a variable.
Thanks in advance
Francesco
[EMAIL PROTECTED]


Re: [PHP-DB] Redirect.

2003-12-02 Thread Richard Davey
Hello gfmb,

Tuesday, December 2, 2003, 11:18:40 AM, you wrote:

gli I have a problem.How can I redirect from a PHP script to
gli another script in asp, php or a HTML page? 
gli This script redirect to another script in function of the values of a variable.

This isn't really a database related question, is it?
See PHP-General.

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

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



Re: [PHP-DB] Fonction timer

2003-12-02 Thread Ignatius Reilly
Dear friend, you're besides the point and needlessly condescending.
Michel was asking about something very different: PHP cron jobs, not time
intervals.

Ignatius
_
- Original Message -
From: Ivan Fomitchev [EMAIL PROTECTED]
To: Michel GUIRAUDOU [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 19:23
Subject: Re: [PHP-DB] Fonction timer


 Hello Michel,

 MG J'ai regard la doc php, et je n'ai pas trouv de fonction timer.
 MG Je souhaite lancer un timer  l'expiration duquel j'excuterai un
programme.
 MG Est ce possible? Y a t'il des fonctions ou des morceaux de programme
 MG facileme  reprendre
 MG pour faire a?

  ! , ,   .
 time  microtime (  ,  
  ).

 MG Merci pour votre aide,

 .

 --
 Best regards,
  Ivan  mailto:[EMAIL PROTECTED]

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



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



Re: [PHP-DB] Redirect.

2003-12-02 Thread Ignatius Reilly
header( Location: http://...; ) ;

_
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:18
Subject: [PHP-DB] Redirect.


Hi all,
I have a problem.How can I redirect from a PHP script to another script in
asp, php or a HTML page?
This script redirect to another script in function of the values of a
variable.
Thanks in advance
Francesco
[EMAIL PROTECTED]

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



RE: [PHP-DB] Redirect.

2003-12-02 Thread Hutchins, Richard
Don't know if I fully understand your question, but, in general, you can
handle redirects with the header() function, e.g., 

header(Location:
http://www.yoursite.com/yourscript.php?msg=0storyID=.$newstory.;);

As you can see, you can include variable=value pairs at the end of the URL
as well (msg and storyID in the example above).

Check for the header() function in the documentation on php.net for
additional information. PHP-GENERAL, as suggested by another user, is the
most appropriate and possibly more helpful mailing list for your particular
question.

HTH,
Rich

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 6:19 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Redirect.
 Importance: High
 
 
 Hi all,
 I have a problem.How can I redirect from a PHP script to 
 another script in asp, php or a HTML page? 
 This script redirect to another script in function of the 
 values of a variable.
 Thanks in advance
 Francesco
 [EMAIL PROTECTED]
 

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



[PHP-DB] Great PHP Book i've come across

2003-12-02 Thread Chris Payne
Hey there everyone,

Just found a great PHP/MySQL/Apache book, it's not as comprehensive as some books, but 
the topics it covers it covers VERY well, and i'm learning alot from it.

It's called:

Sams: Teach Yourself PHP, MySQL and Apache in 24 hours and it's by SAMS PUBLISHING.  
While it's not the most comprensive book out there, for people wanting a refresher 
course who are just getting into working with PHP, this is excellent.  I'm currently 
learning about functions from it and it is outstanding, very easy to understand (Which 
is good because i'm not the sharpest knife in the draw :-)

Just thought i'd mention this, as it's helping me i'm sure it would help others too, 
and this is what this group is for, helping everyone out :-)

Oh and no I DON'T work for them LOL, just found it useful.

Chris

[PHP-DB] Annoying Server Responses

2003-12-02 Thread Hutchins, Richard
Sorry to bother all of you with this, but are any of you still getting
either of these responses each time you post to this list?

response1
Il nuovo indirizzo è: [EMAIL PROTECTED]
La mail è stata comunque inoltrata entro 60 minuti al nuovo indirizzo di
posta.
Si consiglia sin da subito l'utilizzo del nuovo indirizzo; a breve il
vecchio indirizzo verrà inattivato.

Questa è una mail di servizio. NON rispondere.
/response1

response2
Hi. This is the qmail-send program at pb1.pair.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

[EMAIL PROTECTED]:
This message is looping: it already has my Delivered-To line. (#5.4.6)
...
blah,blah,blah
...
/response2

Not that I'm any MVP (most valuable poster) or anything, but I've actually
cut back on the number of times I respond to this list because each time I
post, I have to delete three of these annoying responses (one of response1
and two of response2). If I'm avoiding posting here, then maybe others are
as well. And that all contributes to a less-usable list.

Yeah, I could set up an Outlook Rule to delete these things automatically,
but I shouldn't have to. The administrators of this list should be able to
clear these little things up. Nothing against Fabio Farinelli, I'm sure he's
a great guy. But, c'mon, I've been getting that automated response for about
three or four months now.

If I'm not the only one receiving these responses and if there's an admin
address to send this stuff to, let me know and I'll drop them a line.

Thanks for your time.
Rich

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



Re: [PHP-DB] Annoying Server Responses

2003-12-02 Thread Richard Davey
Hello Richard,

Tuesday, December 2, 2003, 6:51:40 PM, you wrote:

HR Sorry to bother all of you with this, but are any of you still getting
HR either of these responses each time you post to this list?

Yes (he says waiting for another to arrive).

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

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



[PHP-DB] Uploading files

2003-12-02 Thread Hugh Dickinson
I'm trying to upload image files to the server using http file upload. The
files seem to make it to the sever okay, but once they're ther and I try to
move them to where I want them, I get the following error:

Warning: move_uploaded_file(./images/exec/Editor.jpg): failed to open
stream: Permission denied in
/home/hudson/misc/dtr8hcj/public_html/changeexec.php on line 24

Is this my fault, or is it due to some sever configuration beyond my own
control. The line of code the error refers to is:

if(move_uploaded_file($_FILES[$imagename]['tmp_name'],$imageurl))

where $_FILES[$imagename]['tmp_name'] is a valid variable, and the path
specified by $imageurl definitely exists.

Any help would be greatly appreciated.

Cheers

Hugh Dickinson

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



Re: [PHP-DB] Uploading files

2003-12-02 Thread Matt Matijevich
snip
Warning: move_uploaded_file(./images/exec/Editor.jpg): failed to open
stream: Permission denied in
/home/hudson/misc/dtr8hcj/public_html/changeexec.php on line 24
/snip

php needs permission to write to that directory.  Check the permissons
on ./images/exec/.

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



Re: [PHP-DB] Uploading files

2003-12-02 Thread jeffrey_n_Dyke

the web process does not have access to write the directory that oyu're
moving the file to.  in this case ./images/exec/.  most likely you'll need
to either chmod o+w ./images/exec (give the world the write right) or
change the owner of that directoyr to be the web process.  both come with
their owon security implications (from your path structure you look to be
on *NIX).

HTH
JEff


   
 
  Hugh Dickinson 
 
  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]
   
  r.ac.uk cc: 
 
   Subject:  [PHP-DB] Uploading files  
 
  12/02/2003 04:06 
 
  PM   
 
   
 
   
 




I'm trying to upload image files to the server using http file upload. The
files seem to make it to the sever okay, but once they're ther and I try to
move them to where I want them, I get the following error:

Warning: move_uploaded_file(./images/exec/Editor.jpg): failed to open
stream: Permission denied in
/home/hudson/misc/dtr8hcj/public_html/changeexec.php on line 24

Is this my fault, or is it due to some sever configuration beyond my own
control. The line of code the error refers to is:

if(move_uploaded_file($_FILES[$imagename]['tmp_name'],$imageurl))

where $_FILES[$imagename]['tmp_name'] is a valid variable, and the path
specified by $imageurl definitely exists.

Any help would be greatly appreciated.

Cheers

Hugh Dickinson

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

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



[PHP-DB] Killing MSSQL Query

2003-12-02 Thread Michael Lewis
I am looking for a way to kill my current MSSQY query from an PHP script.
For example, I have a page where the user picks some selection criteria, the
script then constructs aa MSSQL query and executes it, 5 minutes into it the
user decides, Forget about it and presses a button (ideally) to kill the
query where ever it is (so as to not bog down the server). I can do it in
MySQL, but have not found the aMSSQL answer in looking through about 50
pounds of MSSQL 2000 documentation. This application REQUIRES MSSQL and they
really want this feature. Any help would be appreciated. PHP is 4.3 running
on a Linux box.

Thanks for any help

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



[PHP-DB] IFRAME sound question!

2003-12-02 Thread JeRRy
Hi,

I know this is a bit off-topic but I find to get
faster answers from this Mailing List (generally
within a few minutes) than any other list.  I find it
quicker to post here and get an answer than trying to
even search it on the web.  And besides most of the
search results on the web are not what you want
exactly, least here can explain.  Anyways...

I am using IFRAMES to refresh a PHP page.  So it
refreshes PART of a page and not the ENTIRE page.

Now I just need to know 1 thing regarding browsers
people use.  I know with basic frames if refreshing
especially in IE you hear a clicking sound when the
page refreshes.  Does this apply with IFRAMES also?

Not sure if this occours in Netscape or AOL etc, but
found IE with basic frames have a sound but how about
IE and Netscape with IFRAME's?

Why am I asking?  Well I don't have sound on this PC,
and if it's going to make an annoying clicking noise I
need to find a way to solve it without the user
needing to edit anything on their pc... So if it does
click is there a way in PHP or javascript or something
to disable the click while viewing my site?

Now if it does not click, great.  Nothing needs to be
done.

The refreshing occours every few seconds, so you could
imagine the clicking noises could be quite annoying.

Thanks in advance!

J














!--

http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.

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



[PHP-DB] Selecting every 50th row

2003-12-02 Thread Richard Davey
Hi php-db,

I have a table with approx. 250,000 rows in it. The primary key is an
ID field. All I am wondering is - is there any way at all from MySQL
to directly select every 50th row in this table?

I.e. row 1, 50, 100, 150, etc and return the ID of each row, ideally
with some kind of limit. Even if it was only possible to select the
IDs of two rows, i.e. row 1 and row 50, that would be good too.

It's almost like I need a step function, like in a FOR NEXT
statement, only SQL-side.

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]

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



[PHP-DB] Function Problem

2003-12-02 Thread Chris Payne
Hi there everyone,

This code works fine until I put it into my function, then it still works BUT however 
many lines are in the file are multiplied.  For example, if I have 3 lines with the 
following:

[EMAIL PROTECTED], myname
[EMAIL PROTECTED], yourname
[EMAIL PROTECTED], ourname

In THEORY this should just print the above, HOWEVER, when it's being called as a 
function it's giving me the following:

[EMAIL PROTECTED], myname
[EMAIL PROTECTED], myname
[EMAIL PROTECTED], myname
[EMAIL PROTECTED], yourname
[EMAIL PROTECTED], yourname
[EMAIL PROTECTED], yourname
[EMAIL PROTECTED], ourname
[EMAIL PROTECTED], ourname
[EMAIL PROTECTED], ourname

When it is inserted into the DB.  It might be something obvious, but here's the code 
below to see if there's anything obvious i'm doing wrong.

Oh and i've checked and $userfile AND $delim are being picked up ok.

function db_importcsv($userfile,$delim) {

if ($userfile == ){
$failed = 'yes';
} else {

$date = date('d m Y');

$row = 1;
$handle = fopen ($userfile,r);
 while ($data = fgetcsv ($handle, 5024, ,)) {
 $num = count ($data);
 $row++;

 mysql_query (INSERT INTO emaillist (EMail,name,date) 
  VALUES ('$data[0]','$data[1]','$date')

 );

};
fclose ($handle);

$failed = no;

};

return $failed;
};

Any help would be really appreciated, as i'm new to functions but enjoying it :-)

Chris

[PHP-DB] Re: Selecting every 50th row

2003-12-02 Thread David Robley
In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 Hi php-db,
 
 I have a table with approx. 250,000 rows in it. The primary key is an
 ID field. All I am wondering is - is there any way at all from MySQL
 to directly select every 50th row in this table?
 
 I.e. row 1, 50, 100, 150, etc and return the ID of each row, ideally
 with some kind of limit. Even if it was only possible to select the
 IDs of two rows, i.e. row 1 and row 50, that would be good too.
 
 It's almost like I need a step function, like in a FOR NEXT
 statement, only SQL-side.

For a simplistic solution(?) assuming that your ID is integer and there 
are no gaps in the sequence, you could do a single select where ID mod 50 
is zero.

Cheers
-- 
Quod subigo farinam

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

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