[PHP] Socket error connecting to mySQL

2003-02-03 Thread Bryan Lipscy
$db= @mysql_pconnect ( $DB_HOST , $DB_USER , $DB_PASS );
@mysql_select_db ( $DB_DB )  or die ( "DATABASE ERROR!".mysql_error() );

Returns DATABASE ERROR!Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2)

MySQL server exists on a Win2ksp3 box.
Apache with PHP 4.3.0 exists on a Slackware 8.1 box.

All parameters are correct.
Boxes can see each other.
All php scripts work when run on the Win2k box.


Any ideas why connecting to php/mysql would throw this error?

Bryan


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




RE: [PHP] [SOLVED] Socket error connecting to mySQL

2003-02-04 Thread Bryan Lipscy
Thank you everyone for your help.  

The cause of this problem was the user account was set up for localhost
rather then the server.  What threw me was the /tmp/mysql.sock part of
the error when MySQL is installed on a Windows box.  I was looking for
something wrong in the PHP script or on the Slackware box.

Thanks again for your help.

Bryan


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




RE: [PHP] empty and isset

2003-02-05 Thread Bryan Lipscy
Env:  Slackware 8.1, Apache 1.3.27, PHP 4.3.0
Bugs: None found for these issues.

I am running to this same problem.  The isset() function appears to have
problems with the empty text value. The empty() function sees the value
of $_POST['q1'] as expected.  

So why is both isset() and empty() returning true on q1?

I included the is_null() to verify that the value is definitely not
null.

Submitting the empty form yields these results:
Value of q1 == 
Value of q1 is NOT NULL
Q1 is empty
q2 is empty
q3 is empty
q4 is empty

Values for q2, q3, and q4 all return as expected.


Source follows:
 


 PHP Test 








Text: 
Radio: 





Checkbox: 

 





PHP Source:
";
}

if (is_null($_POST['q1'])){
print "Value of q1 is null";
} else {
print "Value of q1 is NOT NULL";
}

if (empty($_POST['q1'])){
print "Q1 is empty";
}

if (isset($_POST['q2'])){
print "Value of q2 == ".$_POST['q2']."";
}

if (empty($_POST['q2'])){
print "q2 is empty";
}

if (isset($_POST['q3'])){
print "Value of q3 == ".$_POST['q3']."";
}

if (empty($_POST['q3'])){
print "q3 is empty";
}

if (isset($_POST['q4'])){
print "Value of q4 == ".$_POST['q4']."";
}

if (empty($_POST['q4'])){
print "q4 is empty";
}

?>


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




RE: [PHP] empty and isset

2003-02-05 Thread Bryan Lipscy
Belay that one.  I figured it out.  My err.

I will shut up and go back to lurk mode.

So sorry, please don't flog me.




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




RE: [PHP] Learning PHP

2003-02-12 Thread Bryan Lipscy
You may want to wait a few days on this book. The 2nd edition is due out
tomorrow.

Search on 0-672-32525-X 

-Original Message-
From: Brent Baisley [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 12, 2003 9:19 AM
To: Greg Luce
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Learning PHP


Normally I don't recommend a SAMS book since I often find them lacking 
depth. But I picked up"PHP and MySQL Web Devlopment" and actually 
thought it very helpful. By chapter two you're reading and writing files

and by page 150 (of and 800+ page book) you're into object oriented 
programming. It covers most everything you would want to do from 
creating graphics on the fly, to making a forum and ecommerce. It also 
has a few chapters on security, which is a very good thing.

The one area that did bother me was that only one chapter was dedicated 
to creating an ecommerce site and one other chapter to ecommerce 
security issues. Personally, I think ecommerce could have it's own book 
and shouldn't haven't been included. But I guess if you are experienced 
in creating ecommerce sites it's good to have an overview of it.

On Wednesday, February 12, 2003, at 10:14 AM, Greg Luce wrote:

> Could anyone recommend a fast track for learning php for an 
> experienced ColdFusion developer? I'm working my way through the 
> tutorials on php.net and free2code.net, but they seem pretty 
> kindergarten. Any advice?
>
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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


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




RE: [PHP] cookie problem....

2003-02-13 Thread Bryan Lipscy
>From your code snip it looks like you are missing ?> after the if
contruct.  

Bryan


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




RE: [PHP] problems with cookies and PHP

2003-02-13 Thread Bryan Lipscy
I have been playing with this at home.

Perhaps this makes it a bit easier.

boolean setcookie ( string name [, string value [, int expire [, string
path [, string domain [, int secure])
boolean setcookie (name, value, expire, path, domain, secure)



Fwiw, a solution from another project:



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




RE: [PHP] What happened to phpEdit???

2003-02-16 Thread Bryan Lipscy
Did you check google?
http://ozu.arecom-sa.com/~marms/phpedit.net/

-Original Message-
From: Al [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 16, 2003 8:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] What happened to phpEdit???


Their site no longer responds.

Surely, we haven't lost one of the best php editors.


-- 
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] Protecting files

2003-02-17 Thread Bryan Lipscy

>How can I protect my php files among other files like templates
>(.inc) and mysql config  (config.inc) files being copied/read/imported 
>(front page)/used by other applications other than my site...
>can this be done by htaccess? is so , could anyone point me into right 
>direction?


I have renamed my sensitive (those containing l/p for mail and mysql)
files to .php and constructed them to render a blank page if ever
directly called.  

Something like this:





I do not think that -r to everyone would work in that Apache still needs
to read the file when included by another script.

Still looking for a better way.  What concerns me the most is if a code
disclosure bug is later discovered in 4.3.0 or another version.  

Bryan



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




RE: [PHP] Protecting files

2003-02-17 Thread Bryan Lipscy

>How can I protect my php files among other files like templates
>(.inc) and mysql config  (config.inc) files being copied/read/imported 
>(front page)/used by other applications other than my site...
>can this be done by htaccess? is so , could anyone point me into right 
>direction?


I have renamed my sensitive (those containing l/p for mail and mysql)
files to .php and constructed them to render a blank page if ever
directly called.  

Something like this:





I do not think that -r to everyone would work in that Apache still needs
to read the file when included by another script.

Still looking for a better way.  What concerns me the most is if a code
disclosure bug is later discovered in 4.3.0 or another version.  

Bryan



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




RE: [PHP] Protecting files

2003-02-17 Thread Bryan Lipscy
That is called Cross-Site Scripting (XSS).
I have not been able to get access to the variables via an XSS exploit.
It appears that Apache renders the php code before sending off the
requesting include function.

I also like the .htaccess way of preventing user access to the scripts.
This is also worthy of further investigation.

Bryan


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




RE: [PHP] mysql select and date functions

2003-02-18 Thread Bryan Lipscy
Change your query:
select  dayofmonth(Posted) as DOM_Posted, 
month(Posted) as M_Posted, 
year(Posted)as Y_Posted, 
hour(Posted) as HH_Posted, 
minute(Posted) as MM_Posted, 
Name, 
Prayer 
from prayer

Then access the access the fields by the name (DOM_Posted).
$recSet = mysql_query($query);
$row = mysql_fetch_assoc($recSet);
Access individual field:
$row['DOM_Posted'];
$row['M_Posted'];   
etc

OR
Use the php date (Don't know - haven't tried) functions to parse the
required values out of the Posted field.

HTH,
Bryan


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




RE: [PHP] Re: Submit buttons

2003-02-25 Thread Bryan Lipscy
HTML:


JS:
Function DoThis(){
frmMain.method = "POST";
frmMain.action = "admin.php";
frmMain.submit();
}

Where frmMain is the name for the FORM:


Read all about it in: http://www.oreilly.com/catalog/jscript4/

Bryan

-Original Message-
From: Greg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 12:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Submit buttons


I'm horrible at javascript, does anyone have a script that will do this?
Thanks again!!

"Oliver Witt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Greg schrieb:
>
> > Is there any way that I can have a form submit to different pages
depending
> > on the submit button that is pressed?  Thanks!
>
> dont use submit buttons, but buttons... (type="button") calling a 
> script
that
> submits the form to whatever page you want it to.
> Olli
>



-- 
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] how___??

2003-02-25 Thread Bryan Lipscy
RTM first please:
http://www.php.net/manual/en/function.mysql-connect.php

$link = mysql_connect("localhost", "mysql_user", "mysql_password") or
die("Could not connect: " . mysql_error());

Replace localhost with the hostname of your mysql server.



-Original Message-
From: Luis A [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 1:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] how___??


hlelooww>)

i need some one can help me please?

i need to make this quine of conection 

for example

i want to connect to a remote mysql  server

i realy apreciate if some one can help me 

please?

>)


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



RE: [PHP] how___??

2003-02-25 Thread Bryan Lipscy
Please read the online documentation at http://www.php.net

Also read through examples at http://www.zend.com/tips/tips.php?CID=113

And before you ask another question please read:
http://www.catb.org/~esr/faqs/smart-questions.html

Each of these pages may be translated at http://babel.altavista.com

Bryan


-Original Message-
From: Luis A [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 2:16 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] how___??


i need to do this


$link = mysql_connect("remote host", "mysql_user", "mysql_password") or
die("Could not connect: " . mysql_error());

how is that ???
do i have to put the same function ?

or is diferent?

----- Original Message -
From: "Bryan Lipscy" <[EMAIL PROTECTED]>
To: "'Luis A'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 4:57 PM
Subject: RE: [PHP] how___??


> RTM first please: 
> http://www.php.net/manual/en/function.mysql-connect.php
>
> $link = mysql_connect("localhost", "mysql_user", "mysql_password") or 
> die("Could not connect: " . mysql_error());
>
> Replace localhost with the hostname of your mysql server.
>
>
>
> -Original Message-
> From: Luis A [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 1:34 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] how___??
>
>
> hlelooww>)
>
> i need some one can help me please?
>
> i need to make this quine of conection
>
> for example
>
> i want to connect to a remote mysql  server
>
> i realy apreciate if some one can help me
>
> please?
>
> >)
>
>


-- 
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] mysql trouble

2003-02-25 Thread Bryan Lipscy
Create a user with appropriate privledges for the database.  DO NOT use
root.  





You did not mention where the $nombre, $direccion, $telefono, or $email
variables are being initialized.
To capture the values from a form use $_POST['name'] where name is the
name of the field on the form.

HTH

-Original Message-
From: Luis A [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 4:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] to paulm Re: [PHP] mysql trouble


hey i think the root does not need password to connect to mysql

or yes 

on my server the root user does not have password
thats why i dont know why he does not update the database?

- Original Message -
From: "paulm" <[EMAIL PROTECTED]>
To: "Luis A" <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 6:48 PM
Subject: Re: [PHP] mysql trouble


> you don't have a password for root in mysql_connect
> - Original Message -
> From: "Luis A" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 26, 2003 1:04 AM
> Subject: [PHP] mysql trouble
>
>
> hi pasl i got a troblem here
>
>
> if some one can help me ?
>
> take a look at this
>  // process form
> $link = mysql_connect("localhost", "root"); 
> mysql_select_db("mydb",$db); $sql = "INSERT INTO agenda (nombre, 
> direccion, telefono, email) " +
>   "VALUES ('$nombre', '$direccion', '$telefono', '$email')"; $result =

> mysql_query($sql); echo "¡Gracias! Hemos recibido sus datos.\n";
>
> ?>
>
>
>
> HE DOES NOT WORKING
>
> any subjest ?
>
>



-- 
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] no session id

2003-02-25 Thread Bryan Lipscy
RTM: http://www.php.net/manual/en/ref.session.php
Tutorial: http://www.zend.com/zend/tut/session.php






-Original Message-
From: php [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 4:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP] no session id


this code doesn't ouput a session-id.
is the code right? and if not, any suggestions what's wrong? i'm new
into sessions, so forgive me for stupid questions.. thanx michiel






-- 
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] Include files

2003-02-25 Thread Bryan Lipscy
Funny thing about online manuals.

include() http://www.php.net/manual/en/function.include.php
include_once() http://www.php.net/manual/en/function.include-once.php

Please read: http://www.catb.org/~esr/faqs/smart-questions.html


-Original Message-
From: Kenneth Suralta [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 4:35 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Include files


How do I include external library files in PHP???
I would like to put the lines that are repeated in each php files, in a 
separate file.
e.g.


Kenneth



-- 
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] Session SID curio

2003-02-25 Thread Bryan Lipscy
I ran into a weird curiosity playing with sessions.

Consider this working code:



If I access http://hostname/sess.php from my internal network this is
the result:

Session ID == 

If I access http://www.domainname.net/sess.php from my internal network
this is the result:

Session ID == PHPSESSID=aed42b1e8e514e2b28e630729edfa24b 


Server: Apache/1.3.27 (Unix) PHP/4.3.0
www.domainname.net maps to hostname.  They are the same server, just
accessed differently.

Maybe I missed it but I didn't see anything in the docs, archives or
bugs about this.  

Anyone know why this happens?

Bryan




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



RE: [PHP] testing for < 0

2003-02-28 Thread Bryan Lipscy
See isset() and empty()

-Original Message-
From: Steve Buehler [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 28, 2003 10:29 AM
To: PHP
Subject: [PHP] testing for < 0


I have a form that has input for minutes.  My problem is that I am
trying 
to test to see if the field is blank or not and if they enter a "0"
(zero), 
my test always show it as blank.  I have tried !$timemb and 
!is_numeric($timemb).

Thank You
Steve


-- 
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] MySQL Query Result Question

2003-02-28 Thread Bryan Lipscy
Shouldn't that be:

while($data=mysql_fetch_array($result))
{
//SSLT
}

NOTE: Added ) and changes $query to $result

-Original Message-
From: Van Andel, Robbert [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 28, 2003 3:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL Query Result Question


I have the following query:
$query  = "SELECT d.utilization, d.capacity_date, d.day, i.id,
i.interface, cd.date, cd.id ";
   $query .= "FROM (capacity_data as d LEFT JOIN interfaces as i ON
d.interface = i.id) ";
   $query .= "LEFT JOIN capacity_date as cd ON d.capacity_date=cd.id ";
   $query .= "WHERE i.router = '$cmts[$i]' AND cd.date >= '$useDate' ";
   $query .= "ORDER BY i.interface,cd.date DESC";
 
if(!$result = mysql_query($query)) die(mysql_error());
 
while($data=mysql_fetch_array($query)
{
//SSLT
}
 
The query itself runs just fine.  However, I've run into a problem with
the loop I've created.  During one of the iterations, the query returns
no data so during the subsequent loop the previous query's results is
used in it's place.  I do not want this to happen.  What is the best way
to destroy $result before I run the query?

Robbert van Andel 




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



RE: [PHP] Re: Browser Sniffing

2003-03-04 Thread Bryan Lipscy
>What's e.g. mean?

Latin: exempli gratia
Translated: for example

i.e.
Latin: id est
Translated: that is




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



RE: [PHP] Maintain " and ' in html textfields

2003-03-04 Thread Bryan Lipscy
Look up magic quotes in the docs.
http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc



The docs are mmm mmm good.


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



RE: [PHP] Maintain " and ' in html textfields - REPLY

2003-03-04 Thread Bryan Lipscy


http://www.php.net/manual/en/function.preg-quote.php

preg_quote($var, '\'')
preg_quote($var, '"')

Thank you for asking this question.  I learned something new.  This
looks like a good way to mitigate SQL Injection attacks as well.



-Original Message-
From: Daniel Guerrier [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 04, 2003 8:13 PM
To: 'php user group'
Subject: RE: [PHP] Maintain " and ' in html textfields - REPLY



I forgot to mention that I'm use add and stripslash
on
the data so magic quotes wouldn't help.  The problem
is the " from the text is closing the " from the
html.
> 
> --- Bryan Lipscy <[EMAIL PROTECTED]> wrote:
> > Look up magic quotes in the docs.
> >
>
http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc
> > 
> > 
> > 
> > The docs are mmm mmm good.
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more 
> http://taxes.yahoo.com/
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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


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



RE: [PHP] i got a problem

2003-03-05 Thread Bryan Lipscy
Try

echo $sql;

To check your sql before execution.


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



RE: [PHP] session data

2003-03-05 Thread Bryan Lipscy
>Is the number by second, minutes, etc?
session.gc_maxlifetime specifies the number of seconds after which data
will be seen as 'garbage' and cleaned up. 

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

Bryan


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



RE: [PHP] TO Bryan LipscyRe: [PHP] i got a problem

2003-03-05 Thread Bryan Lipscy
That is what I thought it would do.  A couple of suggestions:

$sql = "INSERT INTO agenda (nombre, direccion, telefono, email, pais,
comentario) VALUES ('.$_POST['$nombre'].', '.$_POST['$direccion'].',
'.$_POST['$telefono'].', '.$_POST['$email'].', '.$_POST['$pais'].',
'.$_POST['$comentario'].')";

OR

$nombre = $_POST['$nombre'];
$direccion = $_POST['$direccion'];
$telefono = $_POST['$telefono'];
$email = $_POST['$email'];
$pais = $_POST['$pais'];
$comentario = $_POST['$comentario'];

$sql = "INSERT INTO agenda (nombre, direccion, telefono, email, pais,
comentario) VALUES ('$nombre', '$direccion', '$telefono', '$email',
'$pais', '$comentario')";

There is no need for the \n in the SQL call.


-Original Message-
From: Luis A [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 04, 2003 8:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP] TO Bryan LipscyRe: [PHP] i got a problem


HE show me this
INSERT INTO agenda (nombre, direccion, telefono, email, pais,
comentario) VALUES ('','','','','','')¡THANKS! WE HAVE RECEIVED YOUR
DATA.


i think he does not asimilate the $ on the variable VALUES (' $DATA,' )
- Original Message -
From: "Bryan Lipscy" <[EMAIL PROTECTED]>
To: "'Luis A'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, March 05, 2003 12:27 PM
Subject: RE: [PHP] i got a problem


> Try
>
> echo $sql;
>
> To check your sql before execution.
>
>



-- 
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] Tryng To Prevent Caching on IE 5-6.0

2003-03-07 Thread Bryan Lipscy
Try: header("Cache-control: private");


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



RE: [PHP] Stupid question perhaps?

2003-03-27 Thread Bryan Lipscy
Anything in the apache error_log?

-Original Message-
From: Tom Tsongas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2003 10:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Stupid question perhaps?


I just recently upgraded to PHP 4.3.1 and Apache 2.0.44. I had been 
previously running PHP 4.0.4 and Apache 1.3.20. I had a fully enabled 
PHP website that I had been developing on for some time.
After I upgraded, the entire website is virtually non-functional. I keep

receiving 'Page cannot Display' or 'Document contains no data' errors.

I am not sure if this is a configuration issue on Apache or PHP. phpinfo

seems to work fine and I don't encounter issues accessing pure HTML 
pages directly. Just the PHP ones?

Any ideas folks?

- Tom


-- 
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] Is there a PHP for Dummies?

2003-03-28 Thread Bryan Lipscy
Use the Zend Beauford.
http://www.zend.com

For beginners: http://www.zend.com/interest/beginners.php

Using Google:
http://www.phpbuilder.com/manual/function.get-magic-quotes-gpc.php



-Original Message-
From: Beauford.2002 [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 28, 2003 1:54 PM
To: PHP General
Subject: [PHP] Is there a PHP for Dummies?


I'm really tired of trying to figure out the PHP manual and need
something that explains things in plain straight forward English. Like
get_magic_quotes_gpc() for example - the manual says how to use it and
what it returns - but nowhere can I find out what it's for. Does it
count sheep, do a quote of the day, or what - maybe I'm just stupid -
but in any event I have spent more time in the last two weeks searching
for things and getting no answers - Any help in pointing me a good
straight forward tutorial/manual would be appreciated.

B.



-- 
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] Is there a PHP for Dummies?

2003-03-28 Thread Bryan Lipscy
Yes, an excellent book.

-Original Message-
From: Kenn Murrah [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 28, 2003 2:14 PM
To: Mike; [EMAIL PROTECTED]
Subject: Re: [PHP] Is there a PHP for Dummies?


oh, and that reminds me ... another O'Reilly title, "PHP Cookbook" is
REALLY helpful if, like a lot of us, you like to learn from examples ...


- Original Message -
From: "Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 28, 2003 4:10 PM
Subject: Re: [PHP] Is there a PHP for Dummies?


> Try out "Programming PHP" by Rasmus Lerdorf from O'Reilly. I got it 
> and learned everything from it. Once you've read the book once or 
> twice, you can just use the PHP Manual...
>
> -Michael
> On Fri, 2003-03-28 at 12:53, Beauford.2002 wrote:
> > I'm really tired of trying to figure out the PHP manual and need
something
> > that explains things in plain straight forward English. Like
> > get_magic_quotes_gpc() for example - the manual says how to use it 
> > and
what
> > it returns - but nowhere can I find out what it's for. Does it count
sheep,
> > do a quote of the day, or what - maybe I'm just stupid - but in any
event I
> > have spent more time in the last two weeks searching for things and
getting
> > no answers - Any help in pointing me a good straight forward
tutorial/manual
> > would be appreciated.
> >
> > B.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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


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



RE: [PHP] Opinion on a method....

2003-04-04 Thread Bryan Lipscy
Put the connect info into a php file (i.e. connect.php).  
If it is ever directly accessed by the client the PHP engine will render
a blank page.
If your ini file is ever accessed by the client it will render the
contents of the ini file.

Wonder if removing rwx would adversly affect includes to this php
file..

-Original Message-
From: Dan Joseph [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 11:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Opinion on a method


Hi,

I would like to get some opinions here on a method I'm doing to grab
connect information for a mysql connection.

Currently I am doing: $pinfo = fopen
("/director1/directory2/filename.ini",
"r");

I'm looking for a more secure method of doing this.  Is XML a solution?
Is there something else?  Are you doing something similar?

All opinions greatly appreciated...

-Dan Joseph


-- 
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] Opinion on a method....

2003-04-04 Thread Bryan Lipscy
In a php file I can just include the connection information and reduce
the overhead that comes with fopen.  Still gives me one central spot for
changing connection information as necessary.

There is always more than one way to do it.
-Bryan

-Original Message-
From: Dan Joseph [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 11:18 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Ahh, good thought.  I also have it outside the web site
directory tree.

-Dan Joseph

-Original Message-
From: Bryan Lipscy [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 2:14 PM
To: 'Dan Joseph'; [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Put the connect info into a php file (i.e. connect.php).  
If it is ever directly accessed by the client the PHP engine will render
a blank page. If your ini file is ever accessed by the client it will
render the contents of the ini file.

Wonder if removing rwx would adversly affect includes to this php
file..

-Original Message-
From: Dan Joseph [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 11:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Opinion on a method


Hi,

I would like to get some opinions here on a method I'm doing to grab
connect information for a mysql connection.

Currently I am doing: $pinfo = fopen
("/director1/directory2/filename.ini",
"r");

I'm looking for a more secure method of doing this.  Is XML a solution?
Is there something else?  Are you doing something similar?

All opinions greatly appreciated...

-Dan Joseph


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


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

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


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