[PHP] Chaching issues

2002-06-13 Thread eat pasta type fasta

is it possible that the server/browser caches the output and the code 
changes in php are not reflected. I am having wierd problems with fixing 
the code, and it often not responding for a while. When I cause a parse 
error, the php engine does inform me, however it seems to act up on bug 
fixes with variables and calulations.
Is that possible?

Thanks in advance.

R.


--__-__-__
eat pasta
type fasta


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




[PHP] Strange MySQL Query Problem

2002-07-03 Thread eat pasta type fasta

I already got some replies for this but it wasn't it, here is the problem:

I have a simple form which queries the database based on 2 pop-up menu 
choices and keywords entered by the user,
it passes on the variables as follows:

pop-up1=choice1, pop-up2=choice2, textfield=user specified data

the query is as follows

$result = mysql_query(SELECT some_id, some_description, some_feature 
FROM '$pop-up1' WHERE some_description LIKE '%$texfield%' AND 
some_feature LIKE '%$pop-up2');

it tells me that column which equals to the $texfield does not exists, 
meaning that the query seems to be fed wrong? No idea here, $texfield and 
$pop-up2 are not requests for tables but matches in those tables

a bit buffled I am, I've these queries before on larger web servers, this 
is the first time on my workstation and it does just that, simpler 
queries work fine...

thanks in advance,

R

ps. the form is guarded against empty entries
ps2. RedHat 7.3, Mysql 3.23.51, Apache 1.3+ wik PHP 4.2.1 configured for 
MySQL

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




[PHP] server performance

2002-07-21 Thread eat pasta type fasta

Not exactly a PHP question, but you guys will know,

is there a significant performance difference in how long does it take a 
server to find files as the directories become more nested,

eg.

1. file index.php uses images from directory DIR

vs.

2. file index.php uses images from directory images/DIR

vs.

3. file index.php uses images from directory files/images/DIR

Thanks in advance,

R



--__-__-__
eat pasta
type fasta


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




[PHP] number of files in a dir vs. performace

2002-07-22 Thread eat pasta type fasta

I'm using mysql to hold references to image files then served on my pages 
via PHP.

I have typically a set of two files:

thumb and a large original, on occasion there is also a variant inreasing 
the set to 3 per image

currently I am holding all of the files in 1 directory since the DB can 
keep track of them, however their number has grown to over 400 at this 
point

my issue is whether it would be worth it (performance wise) to split them 
into thumbs and works thus having 200+ files per directory as opposed to 
so many, I am expecting the number of images to double in the future.

R

--__-__-__
eat pasta
type fasta


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




Re: [PHP] Re: PHP MySQL Hosting services

2002-04-14 Thread eat pasta type fasta

Check out linux web host comes with PHP and MySql
Their PHP compile is pretty nice, including GD support. Their DB is
run via phpMyAdmin.

http://www.linuxwebhost.com


http://webpipe.net

They seem to be doing good with uptime.. In the last couple months I've been
having a monitoring service check them frequently and so far we're at 100%..

Standard Virtual Package ($24.95/mo - $14.95 setup):
Linux RedHat 7.1
300mb Disk Space
25 POP3 Accounts
10GB/mo transfer
Static IP Address
Apache 1.3.20
PHP 4.0.6
Dedicated MySQL Server
CRON
Telnet/SSH/FTP
Sendmail
SSL
Webmin Control Panel
Host up to 25 Apache VHosts

Premium Virtual Package ($34.95/mo - $14.95 setup)::
Linux RedHat 7.1
500mb Disk Space
50 POP3 Accounts
20GB/mo transfer
Static IP Address
Apache 1.3.20
PHP 4.0.6
Dedicated MySQL Server
CRON
Telnet/SSH/FTP
Sendmail
SSL
Webmin Control Panel
Priority Technical Support
Host up to 50 Apache VHosts

Plus you get a free month credit for referring others.. Hint, hint.. (it's
Bob Weaver, account: custompcweb.com)

Later,

Bob Weaver


Jennifer Downey [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi everyone,

 I am wondering if anyone has a good hosting service? I am currently with
 Aletia which has an excellant package good tech support but sometimes not
 very functional servers.

 My site has gone down at least 3 times within the last 20 days. Too many
for
 me.

 It has to be at least 50 mb disk space, 10 to 15gig /m transfer, of course
 PHP and MySQL, ftp, ssh or telnet, cgi/perl, free domain transfer, at
least
 15 POP3 email accounts, cron support.

 Thanks
 Jennifer
 --
 The sleeper has awaken






 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002





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


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




Re: [PHP] graphing packages

2002-04-15 Thread eat pasta type fasta

http://www.php.net/manual/en/ref.image.php
user comments have a lot of stuff about compling GD issues

then php builder has some working tutorials like this one
http://www.phpbuilder.com/columns/wiesendanger20001218.php3

i was able to take the code from it code and plug in into a dynamic 
situation without much ado

R


hey ppl,

I need to create some fairly complex graphs dynamically, and I need to be
able to specify line, bar, or pie charts. Are there any PHP packages that
someone could point me to that would fill my needs. Thanks



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


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




Re: [PHP] redirect browser

2002-04-20 Thread eat pasta type fasta

make sure that this script is not insterted into an html document but 
it's a stand alone  page eg. checkstudent.php. When the student submits 
their number your form should bring them here (form 
action=checkstudent.php method=post) and the page will do its job. 
Make sure however that there is no output (don't print to screen) on that 
page except error messages in your if statements or you will get errors.

R

I had developed the web-based survey for student.
And I need to check that each only fill in the form once time.
So I write following code to check if the student number
exist in the database or not.
if yes, don't let them to fill in again.
if no, redirect the browser to the page for them to fill in.

=

?php

  $db = mysql_pconnect(localhost, survey, survey);

 if (!$db)
 {
  echo Error: Could not connect to database.;
  exit;
 }

 mysql_select_db(survey);
 $query = mysql_query(select * from surveydb where studno = '$studno');
 $result = mysql_num_rows($query);

 if ($result=1)
 {
  echo Student Number $studno already existed in the database.brbr
  .You don't need to input again!;
 }
 else
 {
  header(Location: http://www.XXX.edu/index.php;);
  exit;
 }
?

=

the code can check the student no. are exist in database or not
but the browser don't redirect to the page if student not exist
in database and display the following error code:


Warning: Cannot add header information - headers already sent
by (output started at c:\html\html\check.php:4) in
c:\html\html\check.php on line 42


I had no idea about this.
Can anyone tell me what's wrong of my code?

Thx!

Joe




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



--__-__-__
eat pasta
type fasta


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




Re: [PHP] Learning PHP

2002-04-20 Thread eat pasta type fasta

I started here it was pretty good, then ofcourse I bought a thick ass 
book:
http://www.mysql.com/articles/ddws/index.html

R

I'm started with PHP and I'm interested in find any place
with some docs and example code. Can anyone help me?

Thanks in advance.




--__-__-__
eat pasta
type fasta


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




Re: [PHP] append line to text file HELP !!!

2002-04-28 Thread eat pasta type fasta

check the read/write permissions in the folder the file is located in, 
they should be set to read/write/execute or th file will not be created,

you might also want to use this format to open file

$fp = fopen(your/path/goes/here, a);

your code would look like this:

?
$fp = fopen(your/path/goes/here, a);
$string_to_write = $newmail . \n;
fwrite($fp, $string_to_write);
fclose($fp);
?


--__-__-__
eat pasta
type fasta


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




Re: [PHP] Redirecting

2002-04-28 Thread eat pasta type fasta

 Seriously, I've tried using
 header(Location: http://www.php.net/;);
 but it returns an error saying that the headers are already set.

this function will not work inside an html file or of you ECHO anything 
to the screen prior to its execution.
An effective way to use it is as a page which processes and sends back 
the variables.


--__-__-__
eat pasta
type fasta


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




RE: [PHP] Login with Text Files

2002-04-30 Thread eat pasta type fasta

Two things,

if you gonna use files for such things it might help to follow such 
format inside the file
[use]=somebody
[password]=theirpass

it might be easier if you have the file named after the user and it sould 
store the pass
eg. somebody.txt
then have php check for the file with file_exists(), 
if the file is there open it via fopen check if the password = the pass 
written in the file
else
tell em to go away

still, it might be a good idea to learn too it with mySQL

Why do you even bother? Just name your file SFISFWEF.html and have that
as your password. If security isn't important, then don't use it at all.
And please don't program anything for anyone else.

---John Holmes...

 -Original Message-
 From: Rodrigo [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 30, 2002 7:54 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Login with Text Files
 
 Hi guys, I'm trying the following code and the problem is that I
always
 get the denied page...
 What I'm trying here is to make a login thru a text file. The logins
are
 in one file named login.txt, and the passwords are in the file called
 pass.txt . I need Help, I can't seem to get thru here and I need it
just
 like that, cause the other option would be to use my server database
 which uses a PHPMYADMIN that I don't know anything about. I can't seem
 to make it work, so let's stay with the text files, cause I don't need
 it to be safe ( security sound ). The code goes after this message.
 Thanks to all.
 Rodrigo.
 
 
 
 ?php
 $logins = File('login.txt');
 $login_cont = count($logins);
 $login_digitado2 = $login_digitado;
 for ($cont=0;$cont$login_cont;$cont++)
 {
   if($logins[$cont] == $login_digitado2)
   {
   $login_indice = $cont+1;
   }
 }
 
 $password = File('pass.txt');
 if ($password[$login_indice] == $password_digitada)
 {

header('Location:http://www.domain.com/restricted/restricted.htm');
 }
 else
 header('Location:http://www.domain.com/denied.htm');
 ?


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



--__-__-__
eat pasta
type fasta


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




Re: [PHP] Re: file() and macintosh line break

2002-05-01 Thread eat pasta type fasta

just a thought, mac line break is \r

you can open and save it as unix that should get rid of the weird 
problem, unless you need it to work for numerous uncotrolled file flow, 
then replacing \r might work with a FOR loop. You might have to fwrite 
to a new file there \r will become \n and have that be processed as a 
continuum of the same script.

R

Rodrigo Peres wrote:
 Hi list,
 
 I'm in a problem that is driving me crazy!!! I want open a file and puts 
 each line into an array, but this files was created in macintosh!! so 
 the file() can't recognize the end line and only outputs 1 element in 
 array!! How can I solve it. I tried to fread() the file and 
 eregi_replace the line breaks, it worked, but now I don't know how to 
 use this to create the array!
 

You can use split().
I think Mac linebreak is better to be recognized by PHP...

--
Yasuo Ohgaki




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



--__-__-__
eat pasta
type fasta


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




[PHP] Session Problems

2002-08-01 Thread eat pasta type fasta

What does it mean when PHP forces the session ID into the URL, the host 
changed something in the configuration without informing me it would 
seem, (it dind't happen before now does)

R

--__-__-__
eat pasta
type fasta


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




Re: [PHP] Help with fopen please.

2002-08-01 Thread eat pasta type fasta

check chmods, if the directory where you're saving the $fd2 is not 777 
then it wont write, keep in mind it's a security issue however, use /tmp 
or instead of indicating paths in the file itself have include(file with 
the path to the dir) instead and put that .inc file off the reach of 
apache and ftp access,

R 

Shane,
You haven't told us what the problem is, only that you're having trouble
making it work. How is it not working? One other question: I have to
assume that the script is running on a different server than the one
your are trying to write to (otherwise, why use ftp?) - are you sure
that the ftp server on that system supports passive ftp? In any case,
fopen may not be the best approach to meet your needs, but you need to
tell us more about what the actual problem is.

..michael..

On Wed, 2002-07-31 at 16:26, Shane wrote:
 Looked in the archive and manual and came up with no luck, so here it goes.
 
 My end result is to save the output of a PHP script as an HTML file in a 
specified directory on a WIN2K server.
 
 my script is such...
 ? PHP
 function save_archive(){
 $filename = http://myserver.net/extranet/archive.php?jobid=1;;  
 $fd = fopen( $filename, r ); 
 $fd2 = fopen(ftp://me:[EMAIL PROTECTED]/extranet/test2.html;, w);
 
 while (!feof($fd)) { 
 $line = fgets($fd, 1024); 
 fputs($fd2,$line); 
  } 
 
 fclose($fd); 
 fclose($fd2); 
 }
 ?
 
 I'm having a terrible time getting this to work. Is there a better way? Or 
can someone point me toward or post an example of some working function I 
could study???
 



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



--__-__-__
eat pasta
type fasta


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