Re: [PHP] subdomain

2002-09-10 Thread Dennis Moore

Grab the $SERVER_NAME environmental variable.  Then parse the variable using
explode on the period in the domain name.  Count the number of elements in
the array.  and selcct the element you want to use

/dkm


- Original Message -
From: "Liam MacKenzie" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Tuesday, September 10, 2002 8:55 PM
Subject: [PHP] subdomain


> G'day everyone,
>
> I have a dilemma...
> I'm running BIND locally, with a wildcard A record.
> That means that if someone goes to http://somebullshit.mydomain.com/
they'll
> get my page up.
>
> What I want to do is catch that subdomain into a variable...  Is there a
PHP
> global that can get that?
> So, if someone goes to http://liam.mydomain.com/, the page will echo
"Hello
> Liam"
>
> Any ideas guys?
>
> Cheers,
> Liam
>
>
>
>
> --
> 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] Base64 and MS Word cutting and pasting.

2002-08-25 Thread Dennis Moore
I've isolated the problem with MS Word and MS Wordpad; The problem does not
occur when pasting from Notepad.  I want to make sure that all the text is
ASCII before converting to MIME encoding.  This shoul alleviate the problems
that are occuring.

Thanks,
/dkm


- Original Message -
From: "@ Edwin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, August 24, 2002 6:37 PM
Subject: Re: [PHP] Base64 and MS Word cutting and pasting.


> Just some ideas.
>
> First, to check if it's really the pasted text from MS Word that is really
> causing the problem, paste the text from MS Word to a text editor like
> "notepad" THEN from "notepad" copy and paste to the  and see if
> the problem is still there.
>
> If it's still there, well, that means it's a different problem.
>
> Perhaps, it's about the "quotes and apostrophes" that you've mention so
> it'd be better to check the manual. See addslashes() or stripslashes().
>
> Or, the problem could be something else. But, I don't really think it's
> because the pasted text is from MS Word... (Pasted text to the textarea
> should have been already converted...)
>
> - E
>
> >
> >I have an application which uses the  tag for users to input
> data.  This works fine.  However, some users are using MS Word to generate
> the text and then cutting and pasting into the .  This works
fine
> as well.
> >
> >However, I am encountering a problem when the application mails the
> submitted content. Everything is viewed fine throught the web.   We are
> MIME encoding the message using base64 functions.  The problem is that not
> all email clients are decoding the MS Word  pasted content properly.
> Quotes and apostrophes are not being decoded properly.
> >
> >I assume the problem is that the MS Word pasted content is not ASCII.
I
> need to convert this content to ASCII before we encode the MIME message.
> >
> >Do you have any ideas?
> >
> >/dkm
>
>
>
>
> _
> $B%&%#%k%9%a!<%k!"LBOG%a!<%kBP:v$J$i(B MSN Hotmail http://www.hotmail.com/JA
>
>
> --
> 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] Re: Protect PHP coding

2002-08-03 Thread Dennis Moore

Everyone understands that Zend has to eat, but so do most of us small
developers.  I have no problem with them charging for their products.  IMO
they would make more money if the pricing for the encoder would be less.
This is a fundamental feature that most of us need.   I would offer a Pro
version of the Zend Studio and bundle the encoder with it for abou $500.
This would enable Zend to capture a significant market share among PHP
developers withoug breaking the bank.

Just a thought...


- Original Message -
From: "Andrey Hristov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 8:16 AM
Subject: Re: [PHP] Re: Protect PHP coding


> > >>>So...
> > >>>Is this equivalent to Zend Encoder?
> > >>
> > >>Not exactly, but in some aspects it is/will be better like the ability
> > >>to generate executable standalone PHP programs that you can distribute
> > >>independently. There is also the question of the price that for Zend
> > >>Encoder is ridiculously expensive.
> > >>
>  The people for Zend have to eat to live.
> People, if there is no Zend there is no core for PHP. This is the same as
> with MySQL. MySQL is free under GPL
> but has no subselects because the companies that has commercial licenses
> didn't wanted that - Monty has
> to eat and he codes other features.
> IMO Zend must exist and this is only possible by selling its products.
> If the company we work for has the money to buy Zend Accelerator licenses
> why not do that instead of using
> other Open Source accelerators. I just want the people from Zend to
continue
> their tremendous work and
> we will have PHP5 and PHP6 and so on otherwise start learning ASP or JSP.
>
>
> My 2 cents.
>
> Regards,
> Andrey
>
>
> --
> 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] Help Please

2002-07-29 Thread Dennis Moore

you cannot print or echo anything back to the browser before running the
header() function...




- Original Message -
From: "Varsha Agarwal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 4:00 PM
Subject: [PHP] Help Please


> Hi,
> I am trying to run a sample program. It connects to a
> postgres database verifies user name and password and
> if correct, displays the login screen.
> But in that program wherever there there are
> setcookies() or header() functions, I get following
> error
>
> Warning: Cannot add header information - headers
> already sent by (output started at
> var/www/html/processing.php:5) in
> /var/www/html/common.php on line 63
>
> I checked the settings of my browser, it can accept
> all cookies.
> Someone help please!!!
>
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.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] spawning scripts to different graphical targets

2002-07-18 Thread Dennis Moore

I think you are SOL unless you use Javascript manage the display amongst the
frames/windows.

/dkm
- Original Message -
From: "Alberto Serra" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 18, 2002 3:31 PM
Subject: Re: [PHP] spawning scripts to different graphical targets


> ?OE?AO!
>
> Martin Clifford wrote:
> > Click here to see the
content
>
> Looks like I was not clear in my question :) This way you just redirect
> *all* the outoput to another target. I need to output at more targets at
> the same time with one link. That is, since links cannot accept multiple
> targets, having my script spawn out a second script that will output to
> the second (third, and so on) target.
>
> > The same applies to JavaScript.
>
> Can't use Jscript at all in this context. The onload event on frame "A"
> would do fine, but what if jscript is not there? Besides, having this
> based an an Onload chain makes it quite slow and the user has the
> impression that only A is changing until the A load process is not over.
> Since b is almost always some sort of menu, this makes pages look weird
> for some seconds on slow connections (that is, one page has the "wrong"
> menu) I need something that will clear and reload both iframes at the
> same time with one single click (and no Jscript).
>
> ?IEA
> aIOAAOOI
> eEA?
>
> >
> Alberto Serra <[EMAIL PROTECTED]> 07/18/02 03:12PM >>>
> >>>
> > ??!
> >
> > Is there a way I can decide where to target my output from server side?
> >
> > suppose my page has two iframes
> >
> > +---++---+
> > ! A !! b !
> > +---++---+
> >
> > while executing a script that is called by A can I spawn another script
> > that will output to "b"? And no, I cant' use any Jscript, but I do know
> > from server side what my target names are (A and b, that is).
> >
> > Bear in mind that A and b might be even different windows, but I'd more
> > than happy even if it worked with iframes on a single window.
>
> @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@
>
> LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> lOrD i'M sHiNiNg...
> YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is...
>
>
> --
> 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] Preventing Multiple Log-Ins after Authentication

2002-07-16 Thread Dennis Moore

I forgot to mention that you can use Javascript to manage the open windows.
We the user closes the main window, you can direct the empty window to log
the user out and close its window as well.



- Original Message -
From: "Dennis Moore" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Monty" <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 3:22 PM
Subject: Re: [PHP] Preventing Multiple Log-Ins after Authentication


> If you do not want to use cookes and use SID or trans SID; Another method
is
> to track your logins via a database.   This can be resource intensive
> though.You need to update the database upon each click or have an
empty
> window refresh every 1-5 minutes.  If there is no activity for 15 or 30
> minutes automatically log the person off in the database.  This requires a
> process to run in cron or a separate background program.  The advantage of
> this is that is very easy to add time based accounting to the session
> management system.
>
>
> - Original Message -
> From: "Monty" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 16, 2002 1:57 PM
> Subject: [PHP] Preventing Multiple Log-Ins after Authentication
>
>
> > Is there a standard method in PHP for preventing multiple people from
> using
> > the same log-in username/password simultaneously on a membership site?
Any
> > suggestions are greatly appreciated.
> >
> > Thanks!
> >
> > Monty
> >
> >
> > --
> > 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] Preventing Multiple Log-Ins after Authentication

2002-07-16 Thread Dennis Moore

If you do not want to use cookes and use SID or trans SID; Another method is
to track your logins via a database.   This can be resource intensive
though.You need to update the database upon each click or have an empty
window refresh every 1-5 minutes.  If there is no activity for 15 or 30
minutes automatically log the person off in the database.  This requires a
process to run in cron or a separate background program.  The advantage of
this is that is very easy to add time based accounting to the session
management system.


- Original Message -
From: "Monty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 1:57 PM
Subject: [PHP] Preventing Multiple Log-Ins after Authentication


> Is there a standard method in PHP for preventing multiple people from
using
> the same log-in username/password simultaneously on a membership site? Any
> suggestions are greatly appreciated.
>
> Thanks!
>
> Monty
>
>
> --
> 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] Best Delete Confirmation Script

2002-06-27 Thread Dennis Moore

It really depends on how complex your site/application is...  I really like
using a popup window with some Javascript that refreshes the parent/opener
page upon updating or executing the PHP.  It then closes the popup window.
If the user says no, it just closes the window.  This gives the use a more
of an application feel rather than a website look.  Just my opinion...

/dkm



- Original Message -
From: "Shane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 27, 2002 12:48 PM
Subject: [PHP] Best Delete Confirmation Script


> Greetings.
>
> I would like your opinions on the best way to implement an "Are You Sure
You Want To Do This?" dialog for an Admin user when they go to delete a
record in a DB.
>
> Do you find that a whole page is usually required for this, or does anyone
have any nice pop up solutions for such a query.
>
> Sure... I hate doing these things too, but when Joe Big Boss gets a bit
trigger happy and kills some data he mistakenly thought was a different
record. You KNOW who is going to hear about it from on high.  :^)
>
> Thanks gang!
> - NorthBayShane
>
> --
> 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] Image GD Wizardry!

2002-06-26 Thread Dennis Moore

I think GIF support was removed from GD several releases ago due to
licensing reasons...

/dkm

- Original Message -
From: "Shane" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 6:48 PM
Subject: [PHP] Image GD Wizardry!


> One would think that pulling binary data from a DB using the function
imageCreateFromString would allow you to output that string to any format.
(GIF JPEG PNG) or whatever is supported by your version of GD.
>
> But this code flakes out and creates no image if it reads from a binary
file made by a GIF file. (works great for JPEGs!!)
>
> Anyone see what the problem might be? Or know of any way to output a JPEG
or PNG from a binary GIF file in a mySQL DB?
>
> Theory code only...
>
> 1. Query binary string from DB
> 2. Create Image From String
> 3. Scale your image to fit the size you need.
> 4. Use ImageCreateTrueColor to create your compatible background square
> 5. Fill it with your background color using ImageFilledRectangle
> 6. Use ImageCopyResampled to place your Image from String onto you
background image
> 7. use imageJpeg to output your true color image as a JPEG
>
> Since this works great as JPEG IN, JPEG OUT, but does NOT work when GIF is
the source, is this because ImageCopyResampled can't use the GIF image?
>
> If so, anyone have a nice code snippet that will turn client uploads from
GIFs into JPEGS?
>
> - Thanks in advance folks, I realize this is a tough one, and any
suggestions are always greatly appreciated, and as always I will post my
final solution for the archives.
>
> Thanks again.
> -NorthBayShane
>
> --
> 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] Java Pop UP...

2002-06-26 Thread Dennis Moore

Don't you mean Javascript?

I am not sure if I understand your question...but here goes...

Your PHP code will be executed first at the server side.  You can use PHP to
include or write out your Javascript functions in the head of your page.
>From here you can execute your javascript normally.

/dkm



- Original Message -
From: "Doug Coning" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 3:37 PM
Subject: [PHP] Java Pop UP...


> Hi everyone...
>
> I have a php page that return rows from a database.  I then have an href
> link to the individual thread as such:
>
> ".
>
>
> This works, it opens a new window which has the detailed information
needed.
> However, how would I write java code into this to force it to open the
> window at 300 by 255?  I know the java code for this is as follows:
>
>
onclick="MM_openBrWindow('73things_thread.php','Thread','scrollbars=yes,widt
> h=300,height=255')
>
> How do I merge the java code into PHP?
>
> Thanks!
>
> Doug Coning
> Coning Consulting
>
>
> --
> 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] Advantage of CURL over using LYNX

2002-06-26 Thread Dennis Moore

I need to grab some data from a CGI program running on a different server.  I have 
been toying around executing LYNX using the passthru command.  I seem to be able to 
grab the data just fine using "lynx -source -preparsed $URL".   I've started reading 
about CURL.  I am wondering if it is worth my effort to recompile my server to include 
CURL support.  Any feedback is appreciated.

/dkm



[PHP] General IIS Implementation Question

2002-06-04 Thread Dennis Moore

I have written an PHP application using LAMP.  However, I have a client who wants me 
to install the application on his Win2K server.  My application uses PHP sessions with 
trans-SID enabled.

I remember reading on this list where people were having problems getting PHP on 
Windows to work.  I do not remember what the issues were.  My biggest question is it 
best to use IIS or Apache on the windows machine.  What are the pros and cons of each. 
   Any input or opinions would be welcome.

/dkm



Re: [PHP] Imagecreate and/or GD library not activated

2002-05-28 Thread Dennis Moore

check to see if gd is actually activated by using phpinfo() assuming you are
using PHP4...

/dkm


- Original Message -
From: "LeTortorec, Jean-Louis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 28, 2002 2:35 PM
Subject: [PHP] Imagecreate and/or GD library not activated


> Hello everyone.
>
> I wrote a little code creating PNG images under Apache/PHP windows.
>
> As the code works fine, I need to transfer it onto the Linux platform.
> When I execute the code, PHP replies "Fatal error: Call to undefined
> function: imagecreate()".
>
> I had libgd installed. I just added GD 1.8.4.
> The php.ini file says ";extension=gd.so". I removed the comma, restarted
> Apache. Does not work.
>
> I copied libgd.so in /etc/lib/php4 but did not change anything.
>
> Any idea?
>
> Thanks.
>
> Jean-Louis
>
>
>
> --
> 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] matching two form fields function?

2002-05-23 Thread Dennis Moore

Also make sure you trim() the input variables before your comparison...
2cents...

/dkm

- Original Message -
From: "Kevin Stone" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 4:30 PM
Subject: Re: [PHP] matching two form fields function?


> Tis a tad easier than that.
>
> function match_str($str1, $str2)
> {
> if ($str1 == $str2)
> return true;
> else
> return false;
> }
>
> // If the fields don't match exit with error.
> if (!match_str($field1, $field2))
> {
> echo "The fields must match.";
> exit;
> }



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




Re: [PHP] Get domain name

2002-05-23 Thread Dennis Moore

User the global variable
$SERVER_NAME

- Original Message - 
From: "David Orn Johannsson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 10:00 AM
Subject: [PHP] Get domain name


> 
> I need to find out what the domain of the site that I'm running a script
> from, I know this is possable, but I cant find the function in the
> manual.
>  
> the domain would be somthing like www.domain.com
>  
>  
> Thanks David
> 


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




Re: [PHP] Passing to an Applet

2002-05-16 Thread Dennis Moore

Am I missing something?  This is too easy... But here goes...















- Original Message -
From: "Joshua Baker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 5:18 PM
Subject: [PHP] Passing to an Applet


All right I've seen in done in jsp and asp, but I'd like to know if I can do
it in PHP as well.

I've got an applet, which is in the page replay.php, with these parameters
that I need to fill from a URL.











I need to pass 2 parameter in the URL from another page to this one, those
parameters are
FILEPREFIX and MAXINDEX.

I've set my link to read as 

The question is how to I, if I can, use PHP to take those variables from the
URL string and use them for the values on that page.

I know most people want to just say RTFM or look it up, but at this point if
anyone could just tell me what this would be under or where exactly this
info is, if it's possible in php.  Thanks

Anti-Blank
Site Designer/Unix Admin




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




Re: [PHP] Load data infile

2002-05-14 Thread Dennis Moore

You may want to check permissions within your database.  The web server user
may not have permissions to perform this action.

/dkm

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Philip Hallstrom" <[EMAIL PROTECTED]>
Cc: "Peter J. Schoenster" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, May 14, 2002 6:53 PM
Subject: [PHP] Load data infile


> Hello,
>
> Is it possible to do the load data info mysql command via PHP
>
>
> I get an access denied error from mysql when i try to do that.
>
>
>
> Thanks
>
>
> Randy
>
>






> --
> 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] Session Login and Redirect Problem

2002-05-13 Thread Dennis Moore

Issue resolved... For some reason if the $request_uri was empty, the redirect failed 
because it was going to itself.  I enclosed the redirect around an if statement 
checking the request_uri variable.  BTW, $request_uri is a hidden form variable that 
captures the actual $REQUEST_URI global variable when the login form appears.  This 
allows me to redirect the user to the requested page when they log in.   Works like a 
charm!!!

Sometimes in explaining the problem, I see the solution.  
  - Original Message - 
  From: Dennis Moore 
  To: [EMAIL PROTECTED] 
  Sent: Monday, May 13, 2002 5:29 PM
  Subject: [PHP] Session Login and Redirect Problem


  I am using Sessions with mod PHP4.0.6 with trans-sid set on.  Everything works fine. 
 However, after loggin in, I want to automatically redirect the user to a specific 
page if they came from an external site or were given a link via emal.   I realize 
that a session variable is not actually stored until the end of the script.  So I used 
the session_write_close() function to save the session before redirecting using the 
header() function.  It does not work. The session variable fail to be available after 
redirection.

  Any ideas?

  
  0 ) {
 // if they are in the database register the user id
 $valid_user = $userid;
 $valid_group=mysql_result($result,0,"auth_group");
 $valid_perms=mysql_result($result,0,"auth_perms");
 $valid_auth_id=mysql_result($result,0,"auth_id");
 session_register("valid_user");
 session_register("valid_group");
 session_register("valid_perms");
 session_register("valid_auth_id");
 

  /* Redirect browser */
  session_write_close();
  header("Location: http://".$SERVER_NAME.$request_uri); 
  exit; // exit script

 
 } else {
 $invalid_login= "Invalid login:  Could not log you in...
 ";
 }
  }
  }

  ?>


--


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



[PHP] Session Login and Redirect Problem

2002-05-13 Thread Dennis Moore



I am using Sessions with mod PHP4.0.6 with 
trans-sid set on.  Everything works fine.  However, after loggin in, I 
want to automatically redirect the user to a specific page if they came from an 
external site or were given a link via emal.   I realize that a 
session variable is not actually stored until the end of the script.  So I 
used the session_write_close() function to save the session 
before redirecting using the header() function.  It does not work. The 
session variable fail to be available after redirection.
 
Any ideas?
 


 
if (!session_is_registered("valid_user") 
&& $session_login=="proc"){ if ($userid 
&& $password) {      
  // if the user has just tried to log 
in 
 $query = "select * from auth_users 
"   ."where 
auth_username='$userid' 
"   ." and 
auth_password='$password' and active='Y'";           
$result = mysql_query($query) or die("MySQL Login 
Error: ". mysql_error() );    
        if (mysql_num_rows($result) >0 
) {           
        // if they are in the database register 
the user id           
        $valid_user = 
$userid;           
        
$valid_group=mysql_result($result,0,"auth_group");   
            
$valid_perms=mysql_result($result,0,"auth_perms");   
            
$valid_auth_id=mysql_result($result,0,"auth_id");   session_register("valid_user");   
        
session_register("valid_group");   
    
session_register("valid_perms");   
            
session_register("valid_auth_id");   
            
/* Redirect browser */    
            
session_write_close();    
            header("Location: http://".$SERVER_NAME.$request_uri); 
            exit; // exit 
script  
        } else 
{           
    $invalid_login= "Invalid login:  Could not log you 
in...       
        ";      
 }
}
}
 
?>

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


[PHP] Stronge Session Variable Problem with PopUP windows

2002-05-12 Thread Dennis Moore



I am running mod PHP 4.0.6 with Apache 
1.3x.
 
I am using session variables to pass various access 
information.  Everything works like a charm until I popup a new window 
using Javascript.   The session variable is set but to the wrong 
value.  
 
Has anyone else run into this issue or have any 
ideas?
 
TIA 
/dkm
 

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


Re: [PHP] Remote Hosting: Trouble shooting

2002-05-11 Thread Dennis Moore

If it is a unix/linux box use the .htaccess file and define the settings
yourself.Please this file in the document root for your site... Assuming
the system will allow you to do so...

/dkm

- Original Message -
From: "David J Jackson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 11, 2002 12:12 PM
Subject: [PHP] Remote Hosting: Trouble shooting


> Let's see if I can keep this short and simple.
> I'm  having to problems with a hosting service.
> 1. index.php isn't being read as default index.
> 2. Form aren't working (see a below mail_call.php).
> 2A.The mail_call.php works on my localbox (apache-2.0.36 +PHP4.2.0)
> 2B. Hosting company,for reason they didn't make clear are running
> apche.2.0.35 and PHP4.2.0?RC4?
>
> The SA at the hosting company assured me that DirectoryIndex was
> correctly configured for both the top level site index and VirturalHost?
>
> My question is what can I do from a PHP scripting standpoint to *help*
> the hosting company troubleshoot this issue? This has been going on
> now for almost a month.
>
> TIA,
> David Jackson
>
> -- Mail_call.php -
>
> 
> MailCall: Don't forget the stamp!
> 
>
> 
>  print "";
> print $_POST['from'];
> print $_POST['mail_to'];
> print $_POST['sub_ject'];
> print $_POST['comments'];
> print "";
> ?>
>  $_POST['mail_to'],$_POST['sub_ject'],$_POST['comments'],
> "From:$_POST[from]\r\n".
> "X-Mailer: PHP/" . phpversion()
>   ) ?>
> 
> 
> 
>
>
> --
> 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] PHP compared to JSP

2002-05-05 Thread Dennis Moore

Food for thought...

There are a lot of performance issues outside of PHP...

MySQL - version 4.0.x  supports caching...

Apache 2.0 -  is now threaded...

Memory is now cheap... Increase the server's memory

You may also want to consider Zends Optimizer and Accelerator if you need
additional boost in performance.  Or even write your appliation to generate
the HTML pages and place it in the cron job to keep the data refreshed...

Just my 2 cents...


- Original Message -
From: "SP" <[EMAIL PROTECTED]>
To: "Miguel Cruz" <[EMAIL PROTECTED]>; "Pag" <[EMAIL PROTECTED]>
Cc: "Luc Saint-Elie" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, May 05, 2002 2:47 PM
Subject: RE: [PHP] PHP compared to JSP


> Does anyone think caching should be built into php for it to edge out the
competition?
> (like what smarty is doing)
>
> I mean a static page will always serve up faster then a dynamic one.  Also
even if you are
> getting 100 pages/sec on your database, you could cache it for 5 seconds
and you save 500
> accesses to your database.  Yeah the page would be at most 5 seconds old
but no one would
> know.
>
> Plus if you are a crappy programmer then it would mask how slow your code
is :-)
>
>
> -Original Message-
> From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
> Sent: May 5, 2002 3:01 AM
> To: Pag
> Cc: Luc Saint-Elie; [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP compared to JSP
>
>
> On Sat, 4 May 2002, Pag wrote:
> >> Does PHP compile : NO
> >> Does the user loading same page for 2nd time gets better response : YES
> >> it can if caching is provided
> >
> > On a side not..isnt caching a bit like going against why PHP was built
> > in the first place? I mean, information may get a bit out of date if we
> > get a page on the cache instead of getting it "fresh" from the server.
>
> Sometimes the developer knows how stale information can get before it
> needs to be refreshed. An awful lot of pages fetched with GET args are
> just straight-up retrievals from mostly-static databases, and can be
> cached with impunity.
>
> Also, there are other types of caching. On a multi-use machine that is
> busy with other stuff but not getting a lot of web traffic, httpd may have
> been paged out. And the PHP source file will be cached by the filesystem
> for a while after being read, saving subsequent repeat visits the delay of
> a disk operation.
>
> miguel
>
>
> --
> 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] Sessions and Query String Variable Handling

2002-04-28 Thread Dennis Moore

Thanks for your assistance...   I found three small errors that caused me
the problem.

1.  I had an extra line or space in my include file that defines all my
functions after the '?>'
2.  I didn't realize that session_start returns an output.  I assigned a
variable to it.
3.  I needed to passed the REQUEST_URI string in a hidden variable within my
login form.

Voila!!!  Everything worked fine.

I just wasn't seeing it yesterday.   I was just too close to the code...


- Original Message -
From: "John Holmes" <[EMAIL PROTECTED]>
To: "'Dennis Moore'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, April 27, 2002 11:33 PM
Subject: RE: [PHP] Sessions and Query String Variable Handling


> Not for server side. You can use a META REFRESH on the client side, but
> I personally find that ugly.
>
> This is why I always write my functions so that they don't output
> anything. They just assign the output to a variable and return it. That
> way, I can call the function anywhere, save the result, and just echo
> that variable where ever I need to.
>
> ---John Holmes...
>
> > -Original Message-
> > From: Dennis Moore [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, April 27, 2002 5:24 PM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Sessions and Query String Variable Handling
> >
> > Thanks,
> >
> > Is there any way of doing this without using the header() to redirect?
> I
> > have some functions that get executed before the sessions stuff.   I
> am
> > trying to avoid using output buffering or re-writing my code.
> >
> > /dkm
> >
> >
> >
> >
> > - Original Message -
> > From: "John Holmes" <[EMAIL PROTECTED]>
> > To: "'Dennis Moore'" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> > Sent: Saturday, April 27, 2002 8:49 PM
> > Subject: RE: [PHP] Sessions and Query String Variable Handling
> >
> >
> > > $page = $_SERVER["SERVER_NAME"] . $_SERVER["SCRIPT_NAME"] .
> > > $_SERVER["QUERY_STRING"];
> > >
> > > That will recreate the URL that the user clicked on. Save that to a
> > > variable before you check for a session. Once you start a session or
> > > verify that one exists, use header() to send them back to that page.
> > >
> > > ---John Holmes.
> > >
> > > -Original Message-
> > > From: Dennis Moore [mailto:[EMAIL PROTECTED]]
> > > Sent: Saturday, April 27, 2002 2:37 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Sessions and Query String Variable Handling
> > >
> > > Env:  Apache 1.3.x/php4.0.6/mysql3.23.x
> > >
> > > Scenario:  I have built a system that uses PHP sessions for user
> access.
> > > Within the system I send user notifications via email.   Within the
> > > email are links to certain pages with variables.  For example.
> > >
> > > http://mysite.com/view_page.htm?id=6
> > >
> > > My system checks to see if the session is valid.  Since the user is
> > > coming from an email.  There is no session.  So the user is prompted
> for
> > > the user and password.  They enter and click submit.  The
> authentication
> > > passes the user to right page, but losses the variables in the query
> > > string.  Thus causing errors.
> > >
> > > Here is the authentication code...
> > >  set session settings from login form
> > > if (!session_is_registered("valid_user") && $session_login=="proc")
> {
> > >  if ($userid && $password) {
> > > // if the user has just tried to log in
> > >
> > > $db_conn = mysql_connect("localhost");
> > > mysql_select_db("$dbname", $db_conn);
> > > $query = "select * from auth_users "
> > >."where auth_username='$userid' "
> > >." and auth_password='$password' ";
> > > $result = mysql_query($query, $db_conn);
> > > if (mysql_num_rows($result) >0 ) {
> > >   // if they are in the database register the user id
> > >   $valid_user = $userid;
> > >   $valid_group=mysql_result($result,0,"auth_group");
> > >$valid_perms=mysql_result($result,0,"auth_perms");
> > >$valid_auth_id=mysql_result($result,0,"auth_id");
> > >   session_register("valid_user");
> > >session_register("valid_group");
> > >session_register("valid_perms");
> > >session_register("valid_auth_id");
> > > } else {
> > >$invalid_login= "Invalid login:  Could not log you in...
> > >";
> > >   }
> > >  }
> > > }
> > >
> > > Any Ideas on how to pass the query string variables through the
> > > authentication process?
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




Re: [PHP] Sessions and Query String Variable Handling

2002-04-27 Thread Dennis Moore

Thanks,

Is there any way of doing this without using the header() to redirect?  I
have some functions that get executed before the sessions stuff.   I am
trying to avoid using output buffering or re-writing my code.

/dkm




- Original Message -
From: "John Holmes" <[EMAIL PROTECTED]>
To: "'Dennis Moore'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, April 27, 2002 8:49 PM
Subject: RE: [PHP] Sessions and Query String Variable Handling


> $page = $_SERVER["SERVER_NAME"] . $_SERVER["SCRIPT_NAME"] .
> $_SERVER["QUERY_STRING"];
>
> That will recreate the URL that the user clicked on. Save that to a
> variable before you check for a session. Once you start a session or
> verify that one exists, use header() to send them back to that page.
>
> ---John Holmes.
>
> -Original Message-
> From: Dennis Moore [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, April 27, 2002 2:37 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sessions and Query String Variable Handling
>
> Env:  Apache 1.3.x/php4.0.6/mysql3.23.x
>
> Scenario:  I have built a system that uses PHP sessions for user access.
> Within the system I send user notifications via email.   Within the
> email are links to certain pages with variables.  For example.
>
> http://mysite.com/view_page.htm?id=6
>
> My system checks to see if the session is valid.  Since the user is
> coming from an email.  There is no session.  So the user is prompted for
> the user and password.  They enter and click submit.  The authentication
> passes the user to right page, but losses the variables in the query
> string.  Thus causing errors.
>
> Here is the authentication code...
>  set session settings from login form
> if (!session_is_registered("valid_user") && $session_login=="proc") {
>  if ($userid && $password) {
> // if the user has just tried to log in
>
> $db_conn = mysql_connect("localhost");
> mysql_select_db("$dbname", $db_conn);
> $query = "select * from auth_users "
>."where auth_username='$userid' "
>." and auth_password='$password' ";
> $result = mysql_query($query, $db_conn);
> if (mysql_num_rows($result) >0 ) {
>   // if they are in the database register the user id
>   $valid_user = $userid;
>   $valid_group=mysql_result($result,0,"auth_group");
>$valid_perms=mysql_result($result,0,"auth_perms");
>$valid_auth_id=mysql_result($result,0,"auth_id");
>   session_register("valid_user");
>session_register("valid_group");
>session_register("valid_perms");
>session_register("valid_auth_id");
> } else {
>$invalid_login= "Invalid login:  Could not log you in...
>";
>   }
>  }
> }
>
> Any Ideas on how to pass the query string variables through the
> authentication process?
>


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




[PHP] Sessions and Query String Variable Handling

2002-04-27 Thread Dennis Moore



Env:  Apache 
1.3.x/php4.0.6/mysql3.23.x
 
Scenario:  I have built a system that uses PHP 
sessions for user access.  Within the system I send user notifications via 
email.   Within the email are links to certain pages with 
variables.  For example.
 
http://mysite.com/view_page.htm?id=6
 
My system checks to see if the session is 
valid.  Since the user is coming from an email.  There is no 
session.  So the user is prompted for the user and password.  They 
enter and click submit.  The authentication passes the user to right page, 
but losses the variables in the query string.  Thus causing 
errors.
 
Here is the authentication code...
 set session settings from login formif 
(!session_is_registered("valid_user") && $session_login=="proc") 
{ if ($userid && $password) {    // if the 
user has just tried to log in
 
    $db_conn = 
mysql_connect("localhost");    mysql_select_db("$dbname", 
$db_conn);    $query = "select * from auth_users 
"   ."where 
auth_username='$userid' 
"   ." and 
auth_password='$password' ";    $result = mysql_query($query, 
$db_conn);    if (mysql_num_rows($result) >0 
) {      // if they are in the database 
register the user id      $valid_user = 
$userid;    
  $valid_group=mysql_result($result,0,"auth_group");   $valid_perms=mysql_result($result,0,"auth_perms");   $valid_auth_id=mysql_result($result,0,"auth_id");    
  session_register("valid_user");   session_register("valid_group");   session_register("valid_perms");   session_register("valid_auth_id");  
  } else {   $invalid_login= "Invalid login:  
Could not log you in...   ";  } }}
 
Any Ideas on how to pass the query string variables 
through the authentication process?  

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


Re: [PHP] To store or not to store . . .

2002-04-24 Thread Dennis Moore

If your page is frequently access and the data does not change then by all
means store the image in the file system.

however, I have found it useful to store the images in the database for
certain applications which I want to maintain an additional level of
security over the images when using sessions management.   For example, if I
want certain users access to certain images.  It is up to you to balance
performance with referential integrity and additional coding.



- Original Message -
From: "PHP List" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 7:45 PM
Subject: [PHP] To store or not to store . . .


> Hi,
> I was wondering about the following:
> Should I store a picture directly in a MySQL table? Or just store the link
> to a file on the system somewhere?
>
> I would think that leaving the picture as an actual file and just storing
> the link would be quicker. But what are the dis/advantages of storing
right
> in the table? I like the idea of not cluttering up my file system.
Pictures
> would only be about in the 20K range.
>
> Thanks,
> Chris
>
>
> --
> 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 do remove WARNING message

2002-04-22 Thread Dennis Moore

I am not a LDAP expert, however I assume you can place a condition on your
bind command to kill the script or go to your error reporting...



- Original Message -
From: "Jean-Rene Cormier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 22, 2002 1:03 PM
Subject: [PHP] How do remove WARNING message


> Ok I'm trying to create a script that would allow users to bind to an
> LDAP server and we all know there's gonna be some people mistyping their
> password but when I try to bind and put the wrong password I always get
> a warning message like this:
>
> Warning: LDAP: Unable to bind to server: Invalid credentials in
> /whatever/dir/script.php on line 53
>
> Is there a way I don't get this message and I'd put my own error
> message?
>
> Thanks
>
> Jean-Rene Cormier
>
>
>
>
> --
> 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] PHP @ 24-hour programming competition

2002-04-20 Thread Dennis Moore

This sounds interesting... I am not familiar enought with PHP-GTK to give an
informed opinion.  I think your decision should be based on how familiar
with the tools you take into the contest.Since you are not face with a
lot of time, will your competition be using Visual IDEs to aid the rapid
development?

You may wnat to post to one of the php-gtk-* lists.  They may be able to
address your needs in more detail.

Good luck!!



If you choose to use PHP, please post the results of the contest to the
list.  It should be interesting.



- Original Message -
From: "Visontay Peter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 19, 2002 7:43 PM
Subject: [PHP] PHP @ 24-hour programming competition


> Hi!
>
> I have quite an unusual problem for you :) There will be a 24-hour
> programming competition at our university, where teams of 3 have one
> day to solve a complex problem (which will be revealed on the day
> of the competition). Teams cannot get help from "outside", so no outward
> network / phone communication is available, but you can use anything you
> take there with you (any development tools, books, pre-written software
> etc.)
>
> The language in which you write the software is up to you, the most
> popular choices being C++ and Java - but this year our team are going
> to use PHP (and PHP-GTK).
>
> The big question is: will PHP be enough for the whole project, or will
> we need something else (like external C/Java modules)?
> Last year the task was to write an artificially intelligent soccer game
> based on a client-server architecture: there was a server acting like
> some kind of game controller (referee) and 2D display screen, while
> the automated clients (players) were playing individually according
> to the game's rules and some simulated information on what they 'see'
> at the time.
>
> It's said that it will be something quite different this year -
> but required knowledge includes:
> algorithm theory, information and code theory, artificial intelligence,
> queuing, databases, client-server architectures, computer networks,
> control theory, 2D graphic programming and software ergonomy.
> All this in 24 hours - nice, eh? :)
>
> So the question again - are there any parts of all this where you think
> PHP will not be enough? (Apart from the graphics, for which we'll use
> PHP-GTK). If so, what kind of outside module integration do you
> recommend for us?
> Also, which PHP sites / resources / code libraries do you think we should
> (recursively) download which might help us a lot? (Apart from php.net,
> of course.)
>
> We're really interested in your opinions - is this feasible or
> are we just plain mad? :)
>
> Thanks,
> Peter Visontay
> http://prodigycenter.com/cv/
>
>
>
> --
> 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] Removing Properties from Word DOC

2002-04-04 Thread Dennis Moore

I think you are SOL... You may be able to kloodge something but mucking
around with a word doc without having MS Word or its ActiveX/DOM components
is not recommended.

/dkm



- Original Message -
From: "David McInnis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 04, 2002 4:34 PM
Subject: [PHP] Removing Properties from Word DOC


> I need to alter the document properties of Word DOCS that our users
> upload via php.  Does anyone know how to do this?  (I am running PHP on
> a Linux box).
>
> David
>
>
> --
> 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] Apache Default File Include

2002-04-04 Thread Dennis Moore

go to the PHP online documentation and look in the configuration section.

auto_append_file string
Specifies the name of a file that is automatically parsed after the main
file. The file is included as if it was called with the include() function,
so include_path is used.

The special value none disables auto-appending.

Note: If the script is terminated with exit(), auto-append will not occur.


auto_prepend_file string
Specifies the name of a file that is automatically parsed before the main
file. The file is included as if it was called with the include() function,
so include_path is used.

The special value none disables auto-prepending.
- Original Message -
From: "Dan Tappin" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Thursday, April 04, 2002 3:05 PM
Subject: [PHP] Apache Default File Include


> I had seen some where the procedure to add a default file to include in
all
> pages served in a virtual domain under Apache.
>
> Can anyone point me to a FAQ on this of some keywords that I should search
> the Apache site for.
>
> I want to have a PHP file with all my generic functions loaded on every
page
> with out need to remember to add the include.
>
> Thanks,
>
> Dan
>
> P.S. Please CC me as I am on digest
>


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




Re: [PHP] Email from Browser

2002-04-03 Thread Dennis Moore

You have no way of finding a user's email address without the user entering
it into a input tag and submitting it through a form.   The users email
address is stored in their email application not the browser.  So the short
answer is no.

/dkm



- Original Message -
From: "Martin Schichl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 10:33 PM
Subject: [PHP] Email from Browser


> Dear List!
>
> Is there an environment variable in PHP, which holds the value
> of the email-adress, which is stored in the user's browser?
>
> Martin
>
>
> -
> Dipl.-Ing. Martin Schichl
> SC&C Software, Communication & Consulting GmbH & Co KEG
> Grottenhofstr. 3, A-8053 Graz
> Tel. +43/(0)316/265-205, Fax +43/(0)316/265-234
> [EMAIL PROTECTED], http://scc.co.at
>
>
> --
> 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] request for comments

2002-04-03 Thread Dennis Moore

I assume you want comments on the functionality.   The first thing that
strikes me is why would I want to use the product.  I read the desciption
and followed the diagram on the home.  I then looked at the demo on
affero.net.  I quickly got lost on the purpose of the application and why I
should use it over a normal discussion list.  I missed the main point.



my 2 cents...



- Original Message -
From: "Lee Doolan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 8:11 PM
Subject: [PHP] request for comments


>
>
> the dynamic portion of the recently launched
> www.affero.com has been implemented with php /
> smarty / postgreSQL.
>
> the source can be downloaded here:
> http://www.affero.org/source/latest.tar.gz
>
> i would not call this a 'distribution' by any
> stretch of the imagination.  for one thing, it will
> not work out of the box since no credit card
> processing code is included in the tarball.
>
> i would be curious about any remarks, positive or
> negative which anyone might have.
>
> -lee
>
> --
> Share your feedback at Affero:
> http://svcs.affero.net/rm.php?r=leed_25
>
> --
> 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] Cannot upload JPEG only

2002-04-03 Thread Dennis Moore

Very strange... What environment are you runnign PHP?  Do you have any
spaces in the file names or the file names named in a funny format?

/dkm




- Original Message -
From: "Carl Schmidt" <[EMAIL PROTECTED]>
To: "Bob" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 10:12 PM
Subject: Re: [PHP] Cannot upload JPEG only


> No I haven't.  Right now, it's uploading via a simple form POST. I can
> initiate the upload , but when I have the php process the file, it fails
> on the first test for is_uploaded_file, and tmp_name is none.  The thing
> is though, Iam only unable to upload gifs and jpegs, but yet i can upload
> other things like mp3s and text files and such.
>
> Carl
>
>  On Wed, 3 Apr 2002, Bob wrote:
>
> > Did you try passive mode FTP?
> >
> > Later,
> > Bob
> >
> > - Original Message -
> > From: "Carl" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 03, 2002 7:54 PM
> > Subject: [PHP] Cannot upload JPEG only
> >
> >
> > > I'm able to successfully upload mp3s and text files to the server, but
> > > for some reason it won't let me upload jpegs or gifs?  Is that a
server
> > > configuration thing?
> > >
> > > Carl
> > >
> > >
> > > --
> > > 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] Recommendation for PHP Shopping Cart

2002-04-01 Thread Dennis Moore

Take a look at  OSCommerce at http://www.oscommerce.org.

/dkm

- Original Message -
From: "jeremy spielmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 11:13 AM
Subject: [PHP] Recommendation for PHP Shopping Cart


> I'm looking for an off the shelf shopping cart that has been developed in
PHP.  Please send me the link and the cost of the software.
>
> I would develop my own, but time is an issue.
>
> Thanks!
>
> Jeremy
>
> --
> 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] Php.ini

2002-03-30 Thread Dennis Moore

I do not know about a separate php.ini file but you can assign specific
values in your  settings or you can set them using your
.htaccess file pending on how you have set up your server.  Assuming you are
running Apache on a UNIX type machine

ie
php_value upload_max_filesize 500

go to chapter 3 of the documentation for more details...


- Original Message -
From: "Chris Kay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 30, 2002 5:45 PM
Subject: [PHP] Php.ini


>
> Question I have is,
>
> Is it possible to specify a php.ini in each virtual host?
> That way allowing each website to run a different configuration.
>
> Cause I have a website that I want to use
> Session_set_save_handler = user but I want another website to use the
> default php
> Files handle.
>
> Also for things like session auto start ect
>
> Just a thought that it would make it easier.
>
> Thanks in advance.
>
> ---
> Chris Kay, Eleet Internet Services
> [EMAIL PROTECTED]
> ---
>
>
> --
> 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] Case Statements - lil help please

2002-03-30 Thread Dennis Moore

Try the following...

// check the error code and generate an appropriate error message

switch($e) {
case( -1):
$message = "No such user.";
break;

case(0):
$message = "Invalid username and/or password.";
break;

case(2):
$message = "Unauthorized access.";
break;

default:
$message = "An unspecified error occurred.";
break;
}

- Original Message -
From: "Patrick Hartnett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 31, 2002 12:03 AM
Subject: [PHP] Case Statements - lil help please


> Are case statements not implemented in PHP4?
>
> If so, can someone help me debug this one, I seem to have some syntax
> incorrect, and am not sure what exactly is wrong with the statement.  I
get
> a parse error on the first line, but can't find any documentation on case
> statements in PHP4, so I am kinda stuck.
> thanks
> -Patrick
>
> #
>
>
> // check the error code and generate an appropriate error message switch
> ($e) {
> case -1:
> $message = "No such user.";
> break;
>
> case 0:
> $message = "Invalid username and/or password.";
> break;
>
> case 2:
> $message = "Unauthorized access.";
> break;
>
> default:
> $message = "An unspecified error occurred.";
> break;
> }
>
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.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] Question about database-driven web sites.

2002-03-29 Thread Dennis Moore

It all depends on what the needs for your site(s) are.

Typically, you use database driven web sites as a means of storing data
separate from the layout and style of your web site.   The advantage of this
is that you can just update your data in the database without affecting the
layout and style of your web site.  Many developers dynamically serve the
content from a database into the websites using PHP.   This is extremely
powerful if you have content which needs to be represented within a table or
if content changes on a regular basis.

There are many books and web articles on this subject.

I hope this helps... my 2 cents...




- Original Message -
From: "GENESiS DESiGNS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 29, 2002 5:22 AM
Subject: [PHP] Question about database-driven web sites.


> Hello,
>
> What will a database-driven web site do for? How does it releive stress on
me?
> What is it good for? Why should I learn it? Thanks,
>
>
> -GENESiS DESiGNS
> -Sean Kennedy
> -http://www.gdesigns.vcn.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




[PHP] PHP and XML/XLST/WDDX etc

2002-03-29 Thread Dennis Moore

I am looking for opinions and other philosophy on a couple of XML issues.  I have my 
own opinion, but I am curious what others think and what they are doing...

I am in the process of updating many of my applications to include XML/XLST/ and/or 
WDDX technologies.   Many of my applications read a static configuration file which 
assigns values to variables and arrays.   If we need to change something we manually 
edit the configuration files.  In some instances, we have written web interfaces to 
manage these configuration files.  

I am in a dilemma right now between "If it ain't broke, don't fix it" and "Looking 
over my shoulder".  I am trying to determine whether it makes more sense to use XML 
for maintaining configuration files.  

As far as content management, we use static include files or MySQL databases to store 
site content.   I am not sure where the advantage of using XML/XLST for this 
functionality.   

Please comment.



Re: [PHP] php and javascript

2002-03-25 Thread Dennis Moore

Your popup window should be an normal PHP page calling your images in the
database.   You can then setup your form to call the popup windows via
javascript using the window.open() method.

/dkm



- Original Message -
From: "Scott" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 6:13 PM
Subject: [PHP] php and javascript


> I have some image urls that I have stored in a mysql database.  I want to
be
> able to display the images in a popup window using javascript.  But I
haven't
> been able to figure out how to get the get the info to mysql so that the
> image loads when the popup window appears.  Below is an example of the
form
> without any javascript.
>
> 
> 
> ">
> 
>
> Any help appreciated.
> Thanks,
> SW
>
> --
> 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] PHP IDE Feedback

2002-03-21 Thread Dennis Moore

I am currently evaluating the following IDEs that support PHP.

Zend's Studio 2.0
NuSphere's PHPEd
Active State's Komodo

My selection criteria are:

Code Completion 
Debugging
Project Management
Versioning and Source Control
Documentation
Code Deployment

I have read through the documentation of each vendor's product.   I am looking for 
feedback from those who are actually use the product and their satistaction and/or 
disappointment.


  



[PHP] $DOCUMENT_ROOT behavior linux vs solaris

2002-03-19 Thread Dennis Moore



I use the $DOCUMENT_ROOT environment variable quite 
ofter to build an absolute path to files in the web tree.  I just ran into 
a problem moving my code from a linux box (RH6.2) to a SunW Ultra 
60.   Both machines are running the same version of Apache 1.3.20 and 
PHP4.0.6.   Here's the rub.
 
On the sun,   $DOCUMENT_ROOT would add a 
slash at the end of the line where as the linux box would not.
 
For example:
Linux $DOCUMENT_ROOT:  
/www/dir/htdocs
Sun $DOCUMENT_ROOT:  
/www/dir/htdocs/
 
So when I build my paths I get an extra "/".  
Is there any way to make Sun version to work like the Linux version.   
I hate to go back and change all my code.
 
Thanks in advance...
 
 

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


Re: [PHP] Multiple browser instances - is it possible to determine which browser?

2002-03-04 Thread Dennis Moore

You may consider the use of Javascript to control the parent and child
windows and frames of your application.

/dkm



- Original Message -
From: "Neil Kimber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 04, 2002 9:51 AM
Subject: [PHP] Multiple browser instances - is it possible to determine
which browser?


> We have an application framework that tidies up application session
> variables as you traverse from page to page. It works really nicely -
until
> a user opens up 2 instances of a browser. Our code cannot distinguish
> between different browser instances, so browser instance 2 causes our
> application session vars for browser instance 1 to be cleared out.
>
> We've toyed with many ideas and short of forcing a unique hidden value to
be
> 'POST'ed to every page from every page we don't have an elegant solution.
Is
> there any other way that we could do this?
>
> Neil
>
>
> --
> 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] elseif without else

2002-02-28 Thread Dennis Moore

Perfectly legitimate... it is much like having a switch statement without a
default clause.





- Original Message -
From: "Erik Price" <[EMAIL PROTECTED]>
To: "PHP (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, February 28, 2002 7:32 PM
Subject: [PHP] elseif without else


> For any of you PHP legal eagles:
>
> I rtfm'd, but the "elseif" page doesn't say -- is it okay to have
>
> if ($x) {
> // do something
> } elseif  ($y) {
> // do something
> } elseif ($z) {
> // do something
> }
>
> without a final "else"?  My code works fine -- so I know that you -can-
> do this.  What I was wondering is if this is something that is likely to
> get deprecated at some point in the future.  IOW, is it "legitimate",
> regardless of how it works?
>
>
> Thanks,
>
> Erik
>
> PS: is it bad coding style to do the above?  I'd like comments on that
> too if applicable.  My if statements check for conditions and then set a
> variable, and later in the script if that variable exists then something
> else happens.  Is this "sloppy"?
>
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>
>
> --
> 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] header ("Location: URL");

2002-02-21 Thread Dennis Moore

Why not use javascript to launch a new window?

/dkm
- Original Message -
From: "Ali" <[EMAIL PROTECTED]>
To: "'Php-General (E-mail)'" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 8:23 AM
Subject: [PHP] header ("Location: URL");


> Hello,
>
> is there any possibility of redirecting a request URL using
header:Location
> and openning the requested URL in a new window linke target="blank" in
html.
> Thank you.
>
> Ali
>
>
> --
> 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] One more quickie

2002-02-09 Thread Dennis Moore

$qr="select DATE_FORMAT(date_field,\"%Y-%d\") as fmt_date from table
$whereclause";

then grab 'fmt_date' from the results...



> Don´t really want to bother you with these quickies - but:
>
> If i have a result from mysql that is a date (2002-02-09) - how do i
change
> that into a variable with only the first 7 characters (2002-02)?
>




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




Re: [PHP] Count concarent logins (newbie)

2002-02-08 Thread Dennis Moore

>
> in A web site where logins are managed with php sesions
> is it possible to count how many concurent users are loged in ??
>
> I believe that one way is to keep in a mysql table every login
> user but how can i delete a "loged-in" record when user session
> terminates abnormal
>

If you use the database, you many have to delete the session after a timeout
period.  Of course that means you you need to update the session table
everytime a page is opened..

/dkm



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




Re: [PHP] Trying to put ips into database

2002-02-08 Thread Dennis Moore

Not sure what your exact problem is but I did notice you had back ticks(`)
in your insert statement.  You should be using (').   You may need a where
clause in your insrt statement unless you want to populate all rows.  Just a
couple of thoughts.

/dkm


- Original Message -
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 08, 2002 11:18 AM
Subject: [PHP] Trying to put ips into database


> I'm trying:
> $query = mysql_query("select COUNT(*) as rowexists from ips where ip =
> '$REMOTE_ADDR'");
> $result = mysql_fetch_array($query);
> if($result['rowexists'] == false){
> mysql_query("INSERT INTO `ips` (`ip`) VALUES ('$REMOTE_ADDR')");
> }
>
>
> But it keeps putting the ip into tthe array, even if it's already there,
and
> it only gets the first section of the ip!  What am I doing wrong?
>


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




Re: [PHP] PHP Graphics Support

2002-01-31 Thread Dennis Moore

What version of RedHat are your running?

You may want to install the image libraries manually via their
distributions.  Not to say this will work but just a thought.




- Original Message -
From: "Ed Lazor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 11:01 AM
Subject: [PHP] PHP Graphics Support


> I must be doing something wrong and I'm wondering if someone here can help
> me figure out what it is.  The goal is to add graphics support to my PHP
> installation.  The test is a web page with the imagecreate function.
Right
> now I receive Fatal Error:  call to undefined function.
>
> Here's technical information to help troubleshoot this:
>
> The Image Reference page  (http://www.php.net/manual/en/ref.image.php)
gave
> instruction on how to set this up.  The libraries for jpeg (libjpeg-6b-15,
> libjpeg-devel-6b-15), zlib (zlib-1.1.3-12, zlib-devel-1.1.3-12), and png
> (libpng-1.0.8-1, libpng-devel-1.0.8-1) are installed via rpm from
> RedHat.  I downloaded and installed gd
> (http://www.boutell.com/gd/http/gd-1.8.4.tar.gz).
>
> I'm using Apache 1.3.23 compiled with the following configure:
> ./configure \
> --prefix=/opt/apache/install \
> --exec-prefix=/opt/apache/install \
> --enable-module=so \
> --enable-module=env \
> --enable-module=setenvif \
> --enable-module=mime \
> --enable-module=mime_magic \
> --enable-module=negotiation \
> --enable-module=alias \
> --enable-module=rewrite \
> --enable-module=userdir \
> --enable-module=dir \
> --enable-module=autoindex \
> --enable-module=auth \
> --enable-module=headers \
> --enable-module=expires \
> --enable-module=asis \
> --enable-module=include \
> --enable-module=cgi \
> --enable-module=status \
> --enable-module=info \
> --enable-module=log_config \
> --enable-module=log_agent \
> --enable-module=log_referer  \
> --enable-module=vhost_alias
>
>
> I'm compiling PHP with the following configure:
> ./configure --with-mysql --with-apxs=/opt/apache/install/bin/apxs
> --with-zlib-dir=/usr/lib --with-jpeg-dir=/usr/bin --with-gd=/usr/local
>
> Configuring, making, and installing both packages seems to go smoothly.  I
> checked the configure logs from PHP and noticed:
> checking for the location of libjpeg... yes
> checking for jpeg_read_header in -ljpeg... (cached) yes
> checking for the location of libpng... yes
> checking for png_info_init in -lpng... (cached) yes
> checking for gdImageString16 in -lgd... (cached) yes
> checking for gdImagePaletteCopy in -lgd... (cached) yes
> checking for gdImageCreateFromPng in -lgd... (cached) yes
> checking for gdImageCreateFromGif in -lgd... (cached) no
> checking for gdImageGif in -lgd... (cached) no
> checking for gdImageWBMP in -lgd... (cached) yes
> checking for gdImageCreateFromJpeg in -lgd... (cached) yes
> checking for gdImageCreateFromXpm in -lgd... (cached) yes
> checking for gdImageCreateFromGd2 in -lgd... (cached) yes
> checking for gdImageCreateTrueColor in -lgd... (cached) no
> checking for gdImageSetTile in -lgd... (cached) yes
> checking for gdImageSetBrush in -lgd... (cached) yes
> checking for gdImageStringTTF in -lgd... (cached) yes
> checking for gdImageStringFT in -lgd... (cached) yes
> checking for gdImageStringFTEx in -lgd... (cached) no
> checking for gdImageColorClosestHWB in -lgd... (cached) yes
> checking for gdImageColorResolve in -lgd... (cached) yes
> checking for gdImageGifCtx in -lgd... (cached) no
>
>
> It seems like everything should be working.  Any ideas of why it's not?
>
> Now for the part I think may be breaking things to see if you agree and
> have any ideas on how to make it work...  while troubleshooting, I've
ended
> up trying different versions of the gd lib.  I didn't realize the system
> already had a gd library installed when I downloaded and ran the
> installation for the copy from Boutell.com.  To rectify things... I ran
rpm
> -e on what was already on the system and tried re-running the install
> (make, make install) with the downloaded copy.  After that didn't work, I
> tried the reverse approach and reinstalled the rpms with no luck.  I ran
> make clean, and recompiled the apps each time I changed the libraries.  I
> also ran ldconfig each time I installed new libraries.  Now that I'm
> uncertain about whether the libraries are working properly, I'm wondering
> if there's a way to install them to another directory, update
> /etc/ld.so.conf, run ldconfig, and tell the PHP installation to use the
> libraries from the new directory to insure that everything's working
properly.
>
> Sorry for such a long-winded e-mail.  I just wanted to try and provide as
> much information as possible because I've spent a lot of time on this and
> have reached the point where a second person reviewing things would be
very
> helpful.
>
> Thanks,
>
> -Ed
>
>
> --
> 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-mai

Re: [PHP] Swapping for \n... ?

2002-01-30 Thread Dennis Moore

$newstring=nl2br($string);

- Original Message -
From: "Jon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 29, 2002 11:11 PM
Subject: [PHP] Swapping  for \n... ?


> I'm processing a form but all the functions I've found on the web only
seem
> to add the  after the \n. I need to remove the \n altogether - anyone
> know how I can kill the \n and put a  in it's place?
>
> Cheers,
> 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] Date & time

2002-01-29 Thread Dennis Moore

It is much easier to use the mysql DATE_FORMAT()  function to format your
dates when retrieving directly from the data base.  You do not have to
convert to a UNIX time stamp and all that other stuff.

Your select statement should look something like:
$date_format_long="%d:%m:%y at %T";
$query="select DATE_FORMAT(date_field, '$date_format_long' ) as fmt_date
from your_table";

RTM at http://www.mysql.com  Chapter 6






- Original Message -
From: "Torkil Johnsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 29, 2002 7:29 PM
Subject: [PHP] Date & time


> Hello...
>
> I have a field in my mysql database containing date&time on the format
> -MM-DD HH:MM:SS (24-hour format)
>
> Now. I want to output this as follows: DD.MM.YY at HH:MM:SS
> Currently I do this by this function:
>
> function convert_datetime($in){
> $return = substr($in,8,2) . "." . substr($in,5,2) . "." . substr($in,2,2)
.
> " at " . substr($in,11,8);
> return $return;
> }
>
> Is there a better way? Either with mysql or php?
> Now. Another problem. Since my webserver is in the states, and I live in
> Norway, I get a 7 hour time difference.
>
> So when I do date("Y-m-d H:i:s") I get a time that is 7 hours wrong.
> Any idea as to how I can correct this to be 7 hours later (that is: 12 in
> server time is really 19 where I live) in an easy way?
>
> THanks in advance,
> Torkil
>
>
> --
> 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] why isn't this working? (many questions inside)

2002-01-28 Thread Dennis Moore

Just curious,  why not use FTP for such a large file?

/dkm


- Original Message -
From: "Wei Weng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 8:39 PM
Subject: [PHP] why isn't this working? (many questions inside)


> First, I am running (currently) php 4.0.6 under Redhat 7.2 with kernel
> 2.4.10
>
> I know you can do the following:
>
> 
> header("Content-type: application/force-download");
> header("Content-disposition: attachment; filename=blah.txt");
> readfile("blah.txt");
>
> ?>
>
> to force the user to download a file.
>
> However, this wouldn't work if blah.txt is larger than 2G on my machine
> with php 4.0.6 for Redhat 7.2, because all the file I/O operations are
> done in 32 bits functions.
>
> So here are two solutions i though about:
>
> 1) instead of readfile("blah.txt"), do a passthru("cat blah.txt"). Since
> the basic idea of forcing a download is to pipe the file content to the
> standard output (which is the browser in this case), i don't understand
> why passthru("cat blah.txt") wouldn't do the trick. In fact, I can only
> download about 88Mbs of the whole 4G file I planned to download.
>
> 2) recompile the php package with -D_FILE_OFFSET_BITS=64 enabled. However,
> with the ./configure; make; make install, i can't seem to figure out where
> to stick the option in. (prefer doing it in one of the configure arguments
> if possible)
>
> Forgive me if I posted this to the wrong mailing list, I had been losing
> hairs over these puzzled questions.
>
> TIA.
>
> --
> Wei Weng
> Network Software Engineer
> KenCast Inc.
>
>
> --
> 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] Executing files?

2002-01-24 Thread Dennis Moore

All you need to do is the edit the php application type in your httpd.conf
file if you want to apply globally or insert a .htaccess file in the
directory you want to apply the change.

AddType application/x-httpd-php .php .waw-file

/dkm





- Original Message -
From: "Mårten Andersson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 2:19 PM
Subject: [PHP] Executing files?


> Hello.
>
> I want to execute a .waw-file with PHP, I's there any way to do this? I'm
> almost sure I've read how to do this somewhere in the documentation i
> PHP.net, but I can't find it now..
>
> Does anyone know how to do this?
>
>
>
> --
> Mårten Andersson
> Loddbygatan 2
> 60218 Norrköping
>
> URL: http://www.vanvett.net/marten
> email: [EMAIL PROTECTED]
> ICQ: 86515830
>
>
> _
> Chatta med vänner online, prova MSN Messenger: http://messenger.msn.se
>
>
> --
> 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] Increment help..please

2002-01-24 Thread Dennis Moore

All you need to do is the set the field type for the id similar to :

ID smallint not null primary key auto_increment

you do not need to refer to ID in your insert statement.

/dkm

- Original Message -
From: "will hives" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 2:43 PM
Subject: [PHP] Increment help..please


> please help I'm a newb and this is really messing with my head. All I want
> to know is what do I need to add to this script to allow it to increment
the
> ID number. pleasee.
> thank you very much for a simple boy
>
> Will
> 
> $db_name = "altone";
>
> $table_name = "author";
>
>
>
> $connection = @mysql_connect("www.myserver.net", "test", "will") or die
> ("couldn't connect.");
>
> $db = @mysql_select_db($db_name, $connection) or die ("couldn't select
> database.");
>
> $sql = "INSERT INTO $table_name (id, name, email, picture_name)
> VALUES ('$id', '$name', '$email', '$picture_name') ";
>
> $result = @mysql_query($sql, $connection) or die ("couldn't execute
query");
>
>
>
>
>
> if ($picture != "") {
>
>
> move_uploaded_file($picture, "/home/mine/yep/php/$picture_name");
>
>
> }
>
>
>
>
> ?>
>
>
> 
> 
> my contact management system: add a contact
> 
> 
>
> 
> 
> Name & email information
>  
> 
> 
> 
>
> name:
> 
> 
> 
> 
> email:
>
> 
> 
> File
> to Upload:
> http://www.myserver.net/php/$picture_name";; ?>>
> 
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
> Cheers
> Will
>
>
> --
> 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] Uploads

2002-01-21 Thread Dennis Moore

make sure you set the max_file_size in your form.

   ie 

or set it in your php.ini or .htaccess file.

/dkm

- Original Message -
From: "Ronald Tezuka" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 21, 2002 5:50 PM
Subject: [PHP] Uploads


> If anyone can help me out, that'd be greatly appreciated.  I'm trying to
> create an upload form.  Now I've checked both in books and online, and
maybe
> it's becuase I'm trying a weird application, but I can't seem to get
uploads
> greater than 6 megs.  If it is greater than 6 megs, it loads up a blank
page
> even if I have the PHP script that outputs an HTML file.  Anyway I checked
> online when I was first did this and figured out to increase the max value
> in the php.ini file from 2 megs to much higher.  I'm still having trouble
> though.
> Here's what I am using
> Omnihttpd 2.09
> PHP 4.02
> Windows 98 (4.10.1998)
> and IE 4.72.3110
> So if anyone knows why I can't upload files greater than 6 megs
> (approximate) it'd be greatly appreciated if you'd help me.  Thanks
>
> Ron
>
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.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 & MySQL problems, updating database..

2002-01-17 Thread Dennis Moore

Try using mysql_error() to display the mysql error message before issuing
your die().   this will give more information to troubleshoot.  You may not
have the right privileges set up in your database where you can update or
insert into the database or table.

/dkm


- Original Message -
From: "Hawk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 17, 2002 1:18 PM
Subject: [PHP] PHP & MySQL problems, updating database..


> Having a problem with this, I have a working login that supports multiple
> users, and I'm trying to make it possible for the users to change their
own
> settings etc, but I get killed when trying to send the data to the MySQL
> database.
> To connect I use mysql_connect($host,$user,$pswd) and mysql_select_db($db)
>
> the retrieving data from the form works since I belive, since it showed up
> when I added a print "$the vars " but I don't know how to save it to the
> database..
>
> I might be missing some line or maybe it's just because I'm a newbie or
> something.. ;D
> anyway.. I use something similiar to this
> $query = "UPDATE users SET email='$email'"; // and so on..
> $result = mysql_query($query) or die ("blabla");
>
> I don't get any error lines or anything, the only thing that shows is the
> "blabla" thing.
>
> I also tried INSERT INTO in the query but that didn't make any difference
:p
>
> if anyone could tell me what I'm doing wrong I would be happy.. :p
> "the best way to learn is to ask people that know" :p
>
> Hawk
>
>
>
> --
> 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] AUTO_INCREMENT problems

2002-01-17 Thread Dennis Moore

Try...

ALTER TABLE patients CHANGE  id id MEDIUMINT not null primary key
AUTO_INCREMENT

/dkm
- Original Message -
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 17, 2002 12:35 PM
Subject: [PHP] AUTO_INCREMENT problems


> I have an exsisting table without any rows.  I tried to add a new column
> to it and make it an "auto increment" column.  But when I do I get
> this...
>
> ALTER TABLE patients CHANGE  id id MEDIUMINT (9) DEFAULT   not null
> AUTO_INCREMENT
>
> MySQL said: You have an error in your SQL syntax near '' at line 1
>
> ..what did i do wrong?
>
> 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]




Re: [PHP] Changing form look without reloading

2002-01-17 Thread Dennis Moore

You have to use Javascript to make this so...  You may want to go to
hotscripts.com for examples...

/dkm


- Original Message -
From: "Torkil Johnsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 17, 2002 3:24 AM
Subject: [PHP] Changing form look without reloading


> Hello...
>
> I am wondering: Would it be possible to:
> 1) Select an option in a selectbox
> 2) Have a list of checkboxes pop up underneath the selectbox, based on
what
> you selected
> 3) Without reloading the page...
>
> Show/hide layers I can figure out myself... I dont want to have X hidden
> layers with X times 10 checkboxes within each of them.
>
> Suggestions AND CODE snipplets very welcome!
>
> Sincerely,
> - Torkil
>
>
> --
> 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] URGENT : PHP install error on Solaris 7

2002-01-16 Thread Dennis Moore

What is in line 205?  It looks as though you are dynamically loading PHP.
Are you compiling with --with-apxs in PHP?Just a thought...

/dkm


- Original Message -
From: "R'twick Niceorgaw" <[EMAIL PROTECTED]>
To: "php general" <[EMAIL PROTECTED]>
Sent: Wednesday, January 16, 2002 12:03 PM
Subject: [PHP] URGENT : PHP install error on Solaris 7


> Hi all,
> I have a Sparc Solaric 7 system on which I'm trying to install php 4.0.6.
> the installation works fine. But, when I try to restart Apache I get the
> following error. I have Apache 1.3.22
>
> Has any one experienced the same problem ? Or any fix to this ? I'm not a
> unix guy so have no idea as to what this error means.
>
> ANy help will be greatly appreciated :)
>
> Erro msg>>>
>
> ==>apachectl configtest
> Syntax error on line 205 of /usr/apache/conf/httpd.conf:
> Cannot load /usr/apache/libexec/libphp4.so into server: ld.so.1:
> /usr/apache/bin
> /httpd: fatal: relocation error: file /usr/apache/libexec/libphp4.so:
symbol
> ap_block_alarms: referenced symbol not found
>
> -
> R'twick Niceorgaw ( [EMAIL PROTECTED] )
> http://www.niceorgaw.com
>
> 98C Cedar Lane
> Highland Park, NJ 08904
> USA
> 732-246-1434 (R)
> 732-801-3826 (M)
> -
>
>
>






> --
> 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 as a cron job

2002-01-16 Thread Dennis Moore

Please provide more information on how you have set up PHP to run your cron
jobs.  Are you trying to execute via LYNX or directly via a PHP script?

/dkm


- Original Message -
From: "Tiago Luchini" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 16, 2002 8:20 AM
Subject: [PHP] PHP as a cron job


I have been trying to use some PHP scripts as a Linux cron job.

It tries to run but replies that:
Unable to open /home/admin/webmin-0.85/ in Unknown on line 0

I have no idea why PHP parser is making this confusion.
Could anyone bring some light to this mistery please?

Atenciosamente,

Tiago Luchini
Diretor Técnico-Comercial
Galluch Soluções Internet
Tel.: 0xx11 6912-3255
Cel.: 0xx11 7839-7740



-- 
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] Login script, session problem (I think)

2002-01-15 Thread Dennis Moore

More information is needed... what version of PHP are your running?   I bit
of sample code on how you set up your sessions would also be helpful...

/dkm

- Original Message -
From: "Hawk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2002 11:19 AM
Subject: [PHP] Login script, session problem (I think)


> I made a simple login script which uses MySQL for username and password
> retrieval and that stores the username in a session, the problem is that
> this script only works locally, e.g. I can only login from this computer
but
> not from any other, I have session.use_cookies = 1 and I also have another
> session on the page that stores a counted var so the counter doesn't jump
up
> everytime someone changes page.
> The thing confusing me is that the counter session works global but the
> login only works local..
>
> Does anyone have an idea how I should solve this? I'm not so good with php
> yet so I might have missed something, but i think it's wierd anyway... :p
>
> please reply as soon as possible. :)
>
> Hawk
>
>
>
> --
> 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 apache php module on solaris

2002-01-14 Thread Dennis Moore

I think you need to add the apache module extensions to your apache
configuration.

try adding  --enable-apxs or --with-apxs (I can remember the exact syntax)
to the apache configure.

- Original Message -
From: "Gino Paoletti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 14, 2002 9:36 AM
Subject: [PHP] problem with apache php module on solaris


> Hi, I met some problems starting apache with php module on solaris 8.
>
> Apache is so configured:
>
> --prefix=/usr/local/apache-np --enable-shared=max
>
> The httpd -l response is:
>
> Compiled-in modules:
>   http_core.c
>   mod_so.c
>
> Php indeed:
>
>
./configure --prefix=/usr/local/apache-np --with-apxs=/usr/local/apache-np/b
>
in/apxs --with-ldap=/usr/local/ns-solaris-ldap-sdk-5/ --with-mysql=/usr/loca
>
l/mysql --enable-ctype --enable-sockets --enable-ftp --with-java=/usr/local/
> j2sdk1_3_1_02 --with-sybase=/usr/local/freetds
>
> The error is:
>
> Syntax error on line 223 of /usr/local/apache-np/conf/httpd.conf:
> Cannot load /usr/local/apache-np/libexec/libphp4.so into server: ld.so.1:
> /usr/local/apache-np/bin/httpd: fatal: relocation error: file
> /usr/local/apache-np/libexec/libphp4.so: symbol uncompress: referenced
> symbol not found
>
> Any hint??
>
> Nobody steals our chickens and lives to tell. (Duke Nukem)
>
> Saluti   Ginox.
>
>
> --
> 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] Print ONCE ONLY?????

2002-01-12 Thread Dennis Moore

move the following inside your while loop
echo "$row[item_id]","";


- Original Message - 
From: "Dani" <[EMAIL PROTECTED]>
To: "PHP LIST" <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 8:54 PM
Subject: [PHP] Print ONCE ONLY?


> 
> Hi Again!
> 
> Why does this print only one record?
> 
> 1. I have checked on the table on MYSQL and I have  2 records with this
> data.
> 2. Can I actually use the word "and" twice or three times for filtering
> the data that I need during query?? (example: $query = "select * from
> main_table where item_type = 'hotel' and class = 'melati' and price =
> '200' and facilities = 'swimming pool' "
> 
> Could some body help please???
> 
> here is my code
> 
> ...
> $query = "select * from main_table where item_type = 'hotel' and class =
> 'melati'";
> $result = mysql_query($query);
> $row = mysql_fetch_array($result);
> echo "$row[item_id]","";
> while ($row = mysql_fetch_array($result))
>  {
>  echo "WHILE RESULT","$row[item_type]","","$row[class]";
>  }
> 
> 
> thank you again!
> 
> regards,
> Dani
> 
> 
> 
> -- 
> 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] Please "\n" problem????

2002-01-12 Thread Dennis Moore

I assume you your displaying a web page.  HTML ignores \n ... You need to
insert a .


- Original Message -
From: "Dani" <[EMAIL PROTECTED]>
To: "PHP LIST" <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 8:25 PM
Subject: [PHP] Please "\n" problem


> Hi!
>
> thanks for reviewing this email.
>
> I have wrote this script and I have checked it but for some reasons (I
> don't know what) it doesn't work.
>
> Could any body please check and give some feedback please?
>
> 
> include("heading.inc");
>
> echo "Result :\n";   ->>> THIS DOESN'T GIVE ME A
> NEW LINE- WHY ?
>
>
> //CONNECT TO SERVER
> include("connect.inc");
>
> //CONNECT DATABASE
> include("select_db.inc");
>
> $query = "select * from main_table where item_type = '$type' and class =
> '$class' ";
> $result = mysql_query($query);
>
> $row = mysql_fetch_array($result);
>
> echo ("$row[item_id]\n"); - THIS DOESN'T
> GIVE ME A NEW LINE EITHER, WHY ??
>
> while ($row = mysql_fetch_array($result))
>  {
>  echo "$row[item_type]" , "$row[class]";
>  }
>
> ?>
>
>
> Any reply is greatly appriciated
>
> Regards,
> Dani
>
>
> --
> 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] multiple replaces...

2002-01-12 Thread Dennis Moore

try str_replace() ... it allows you to pass an array into the replace
function.

/dkm

- Original Message -
From: "Paul Roberts" <[EMAIL PROTECTED]>
To: "Lauri Vain" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 4:35 PM
Subject: Re: [PHP] multiple replaces...


> have a look at eval()
>
> Paul Roberts
> [EMAIL PROTECTED]
> 
> From: "Lauri Vain" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, January 12, 2002 11:44 AM
> Subject: [PHP] multiple replaces...
>
>
> Hello there,
>
> I have about 30 markers in the text which need to be replaced with the
value
> of a variable or an array.
>
> Common sense comes up with
>
eregi_replace("!one!","blah",eregi_replace("!heh!",'foobar',eregi_replace("b
> lah","ho-ho-ho",text)));
>
> The list above could go on and on... I'm sure there are better ways to
> replace many markers or spans of text with something else. A loop?
Something
> even more easier and better?
>
> Thanks,
> Lauri
> --
> Tharapita Creations
> [dynamic web applications]
> [EMAIL PROTECTED]
> Mobile: +372 53 410 610
>
>
>
> --
> 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] PHP x Mysql

2002-01-10 Thread Dennis Moore

execute "phpinfo();"  on a new page to see if mysql is still compiled in...;


- Original Message - 
From: "Frederico Madeira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 10, 2002 10:37 PM
Subject: [PHP] PHP x Mysql


> Hello !!
> 
> My  server was runing perfect the mysql server and php language.
> 
> Today when i acess any paga that stabilished a conection with mysql  the
> follow mesage return me.
> 
> Fatal error:  Call to undefined function:  mysql_connect() in
> /home/fred/public_html/vg/index1.php on line 14
> 
> How i resolve this problem ?
> 
> Tanks.
> 
> Fred
> 
> 
> 
> -- 
> 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 function declaration in include files

2002-01-04 Thread Dennis Moore




The problem is most likely with your include statement.  The include 
path imay be incorrect...  
 
 
 
"Bobby" <[EMAIL PROTECTED]> wrote in 
message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...> 
I have been using the following function declaration syntax for ages with 
no> problems.> > Main php file:> > 
> include "my-inc.php";> ...>     
FuncExample(arg1,arg2);> ...> ?>> > > 
Include file:> > > ...> 
FuncExample(arg1,arg2){> > }> 
...> > > I have just finished some work for a 
client, after full testing on both my> Unix and Win32 test servers I 
moved the site over to their hosting company> and I get the following 
problem.> > All my functions that are declared in my Inc files are 
spitting back the> error:> > "Fatal error: Call to 
undefined function:..."> > I have spoken with the hosting company, 
but they have considerable trouble> with 'backside' and 'elbow' 
recognition.> > Are there any PHP.ini settings that affect this 
type of function> declaration?> > Any help would be 
appreciated.> > Bobby> > > > > 
> -- > 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] Time Accounting with Session Management

2002-01-03 Thread Dennis Moore



Does anyone know of any good examples of 
implementing time accounting with session management?  I want to be able to 
restrict the number of hours a particular user can view a site.  

 
/dkm

-- 
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] Including files & variables ...

2001-12-28 Thread Dennis Moore

Make sure you include the tags  in your include file for PHP
parsing.  Included files are assumed to be text otherwise.  You need to
provide more information if you have another problem.



- Original Message -
From: "Evansville Scene" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 9:54 PM
Subject: [PHP] Including files & variables ...


I'm having problems passing variables into included PHP files.  How can I do
this?



-- 
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] Function Alias: mysql()

2001-12-06 Thread Dennis Moore

I think it is aliased to mysql_db_query().  However the documentation states
that this function is deprecated in PHP4.0.6.

"Note: This function has been deprecated since PHP 4.0.6. Do not use this
function. Use mysql_select_db() and mysql_query() instead. "  (www.php.net
documentation)

My question is why is my code  still working? If so, what are the
consequences of  using mysql() or mysql_db_query(0 with PHP4.0.6?

/dkm


- Original Message -
From: "Tyler Longren" <[EMAIL PROTECTED]>
To: "Dennis Moore" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 4:23 PM
Subject: Re: [PHP] Function Alias: mysql()


> Are you sure that isn't a custom function in your code (assuming you're
> using somebody else's code)?
>
> It could be an alias to: mysql_db_query()
> It has the same handlers, ex:
> $rez=mysql_db_query($dbname,$query);
>
> Tyler Longren
>
> - Original Message -
> From: "Dennis Moore" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 06, 2001 3:12 PM
> Subject: [PHP] Function Alias: mysql()
>
>
> I cannot seem to find in the documentation the what the function mysql()
is
> aliaseed to using PHP4.0.6.  Any ideas?
>
> Example:
>
> $rez=mysql($dbname,$query);
>
> Everything works fine... But I want to be sure what is actually being
used.
>
> /dkm
>
>
>


-- 
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] Creating multidimensional array dynamically

2001-12-06 Thread Dennis Moore

Not sure what you are trying to do, but try using

mysql_fetch_row ()

you can use SQL to limit your results.

/dkm


- Original Message -
From: "J. Roberts" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 4:08 PM
Subject: [PHP] Creating multidimensional array dynamically


> I can't seem to figure out how to create a multidimensional array from
> a database query.  Here is an example of what I was looking for, using
> NFL quarterbacks as a statistical foundation...
> A record contains the following fields:
>
> NAME, ATTEMPTS, COMPLETIONS, YARDS, TD, INT
>
> Now I would like to be able to create an array with NAME as a key
containing
> the array(ATTEMPTS, COMPLETIONS, YARDS, TD, INT).
>
> That way I would be able to do the following:
>
> echo $quarterbacks["GARCIA"]["YARDS"];
>
> and get the output of 3,100 or whatever the case may be.
>
> Thanks,
> -Jamison.
>
>
>
> --
> 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] Function Alias: mysql()

2001-12-06 Thread Dennis Moore

I cannot seem to find in the documentation the what the function mysql() is aliaseed 
to using PHP4.0.6.  Any ideas?

Example:

$rez=mysql($dbname,$query);

Everything works fine... But I want to be sure what is actually being used.

/dkm




[PHP] PHP4 sessions and Netscape 4.75/Mac

2001-11-19 Thread Dennis Moore



Has anyone run into the following?
 
 
I have set up a site using PHP4.0.6 sessions.  
Everything runs fine with IE and Netscape on PC and UNIX.  However, I 
lose the session when using Netscape 4.75 on Mac. 
 
Any ideas or clues?
 
Thx...
   

-- 
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] fopen and while problem

2001-11-09 Thread Dennis Moore



I am having problems using the fopen functions 
within a while loop.  I am having problems passing variables into the 
function.  Has anyone else had this problem?
 
 
Example:
 
  
$work_dir="$DOCUMENT_ROOT/click/oct01";  $ls_res=system("ls 
$work_dir/*.html > $work_dir/ls.txt");  
$ar_file_list=file("$work_dir/ls.txt");  reset($ar_file_list); 
    while (list ($key, $val) = each 
($ar_file_list)) {  
settype($val, "string");          echo 
"$val";             
if (is_writeable($val)) {        
        $s = stat($val);     
            $bytes = $s[7]; 
               
    echo "Bytes:  $bytes Exists: $val";   
        }   
   $fx = 
fopen($val, "r");       $text = 
fread($fx,filesize($val));       
$size=filesize($val);       echo "$size - $text 
";       
fclose($fx); }
Configure Command:
 
 './configure' '--with-apache=/u1/source/apache_1.3.20' 
'--with-zlib=/usr/local' '--with-jpeg-dir=/usr/local' 
'--with-png-dir=/u1/source/libpng-1.0.12' 
'--with-freetype-dir=/usr/local/include/freetype2' 
'--with-tiff-dir=/u1/source/tiff-v3.5.6-beta' '--with-gd=/u1/source/gd-2.0.1' 
'--with-mysql=/usr/local/bin/mysql-3.23.41' '--with-pdflib' 
'--enable-static-pdflib' '--enable-ftp' '--enable-gd-native-tt' 
'--enable-gd-imgstrttf' '--enable-trans-sid'
 

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

2001-09-07 Thread Dennis Moore

Make sure you do not have an older version of gd on your system before
trying to compile gd a new version.  This will save you hours of
frustration.

/dkm


- Original Message -
From: "Sebastian Wenleder" <[EMAIL PROTECTED]>
To: "Joseph Bannon" <[EMAIL PROTECTED]>; "PHP (E-mail)"
<[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 11:35 AM
Subject: Re: [PHP] GD


> At 10:06 Uhr -0500 07.09.2001, Joseph Bannon wrote:
> >I just installed PHP 4.0.6.
> >
> >1) Do I have to down load GD (graphics library) and install it sperately
or
> >is it in 4.0.6 already?
> >2) Do I have to run anything special during configuration?
> >3) Do I have to completely re-install PHP and Apache?
> >
> >Thanks,
> >
> >Joseph
>
> Hi Joseph,
>
> You have to download GD from http://www.boutell.com/gd/
> make sure you have zlib, libjpeg, libpng, and (if you need it) freetype
> if not compile and install them all...
> then configure php with
> #./configure  \
> --with-gd= \
> --with-zlib= \
> --with-jpeg-dir= \
> --with-png-dir= \
> --with-tiff-dir= \
> --with-freetype-dir=
> #make
> #make install
>
> then you will have to restart apache
>
> Best regards, Sebastian Wenleder
>
> --
> 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] Tracking shipments UPS, FEDEX, etc...

2001-09-06 Thread Dennis Moore

I am not clear in what you want to do.  I think the simplest solution is to
build a table in your favorite database with the tracking number and the
vendor.  Make another table or switch statement that points to the URL for
the vendors tracking mechanism.   Now you can just write a function  that
links to the vendoes tracking mechanism passing along the tracking number to
their form.   I am not sure if this is legal or they allow permission to do
this on their site.

Otherwise you need to get their data via XML and write whole set of
functions and what not to do something that already exists.  This is not
trivial.

/dkm


- Original Message -
From: "Joe Sheble (Wizaerd)" <[EMAIL PROTECTED]>
To: "General PHP List" <[EMAIL PROTECTED]>
Sent: Thursday, September 06, 2001 1:47 AM
Subject: [PHP] Tracking shipments UPS, FEDEX, etc...


> has anybody written any routines or functions they'd care to share for
> parsing the tracking information out of UPS, FEDEX, or other shipping
> carriers tracking pages?
>
>
> --
> 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] Making gd Extensions

2001-09-06 Thread Dennis Moore

GD is was much too painful to install.  It complains about everything.
However, I did finally got it working thanks to your tip Rasmus. Thanks. I
did have an older version of gd lying around on the box.

I manually removed all gd libs and headers from the server.  I recompiled GD
1.8.4 (I got tired of 2.0.1.  It kept complaing about truecolor) .  I then
copied my php configure script and then blew away the entire PHP source. I
found this was necessary.  There is probably another way around this.  But I
needed to be sure that some old stuff wasn't laying around.  I unpacked the
PHP tarball again. Ran configure script.  It worked...

I can really empathize with Chris.   I find coding PHP much easier than
Perl.  However< I am not willing to switch.


- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Chris Mulcahy" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 04, 2001 5:06 PM
Subject: RE: [PHP] Making gd Extensions


> That's quite a rational response...
>
> The most common problem people have when building GD support is that they
> download their own version of GD, but leave the system version of GD and
> PHP picks up the system header files instead of the desired ones and
> things get confused.
>
> Building PHP with GD on RH-6.2 should be quite trivial once you sit down
> and have a look at the error messages and the config.log file and work out
> why you are getting the clashes.
>
> -Rasmus
>
>
> On Tue, 4 Sep 2001, Chris Mulcahy wrote:
>
> > Dennis:
> >
> > Unfortunately, no, I have not had any luck or even any responses to my
> > email.
> >
> > I have officially given up on PHP and have banned it from any system I
> > administer due to problems such as this.  Once you get past the mod_perl
> > compiling with Apache, all is well with Perl and extending it is easier.
> >
> > Too bad, really, because PHP is an elegant language that is easy to
> > develop in.  Compiling extensions, however, is an entirely different
> > matter.
> >
> > I wish you luck, if/when you resolve the problem, please be sure to post
> > the solution, there are still several unanswered requests for assistance
> > in the Google/Dejanews archives for this exact problem.
> >
> > Good luck and happy programming!
> > Chris Mulcahy
> >
> > > -Original Message-
> > > From: Dennis Moore [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, September 04, 2001 2:00 PM
> > > To: Chris Mulcahy; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Making gd Extensions
> > >
> > >
> > > The problem I had was with the compilation of the gd program.
> > >  I installed
> > > an RPM version of gd from Redhat and recompiled.  It worked
> > > like a charm on
> > > RedHat v7.0.
> > >
> > > I am still working on the tarball version of gd.  The
> > > documentation says to
> > > play around the order of some of the settings in the makefile.
> > > Unfortunately, I have to work with a older version of RedHat on this
> > > machine. RedHat v6.2.
> > >
> > > Have you had any luck yet?
> > >
> > > /dkm
> > > - Original Message -
> > > From: "Chris Mulcahy" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, August 30, 2001 11:10 AM
> > > Subject: RE: [PHP] Making gd Extensions
> > >
> > >
> > > > So far, there have been no answers, so I'm guessing that
> > > either we're
> > > > the only two receiving this or everyone who has received it has been
> > > > unable to resolve the problem.
> > > >
> > > > My searches on Google have been unsuccessful so far.  There
> > > are quite a
> > > > few reports of the problem, but no responses.
> > > >
> > > > If I learn anything, I'll be sure to let you know.
> > > >
> > > > Thanks
> > > > Chris
> > > >
> > > > > -Original Message-
> > > > > From: Dennis Moore [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Wednesday, August 29, 2001 8:59 PM
> > > > > To: Chris Mulcahy; [EMAIL PROTECTED]
> > > > > Subject: Re: [PHP] Making gd Extensions
> > > > >
> > > > >
> > > > > I am having a similar problem using gd-2.0.1 where the
> > > > > compilation complains
> > > > > about "conflicting type gdIOCtx".  I am getting

Re: [PHP] Making gd Extensions

2001-09-04 Thread Dennis Moore

The problem I had was with the compilation of the gd program.  I installed
an RPM version of gd from Redhat and recompiled.  It worked like a charm on
RedHat v7.0.

I am still working on the tarball version of gd.  The documentation says to
play around the order of some of the settings in the makefile.
Unfortunately, I have to work with a older version of RedHat on this
machine. RedHat v6.2.

Have you had any luck yet?

/dkm
- Original Message -
From: "Chris Mulcahy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 30, 2001 11:10 AM
Subject: RE: [PHP] Making gd Extensions


> So far, there have been no answers, so I'm guessing that either we're
> the only two receiving this or everyone who has received it has been
> unable to resolve the problem.
>
> My searches on Google have been unsuccessful so far.  There are quite a
> few reports of the problem, but no responses.
>
> If I learn anything, I'll be sure to let you know.
>
> Thanks
> Chris
>
> > -Original Message-
> > From: Dennis Moore [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 29, 2001 8:59 PM
> > To: Chris Mulcahy; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Making gd Extensions
> >
> >
> > I am having a similar problem using gd-2.0.1 where the
> > compilation complains
> > about "conflicting type gdIOCtx".  I am getting a knot on my
> > forehead from
> > the wall in front of me.  Any ideas?
> >
> > /dkm
> >
> >
> >
> > - Original Message -
> > From: "Chris Mulcahy" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, August 29, 2001 9:31 AM
> > Subject: [PHP] Making gd Extensions
> >
> > >
> > > The current item I'm wrestling with is the gd extensions.
> > I've rebuilt
> > > PHP and Apache so many times to enable one feature only to
> > learn that I
> > > forgot to recompile one that I'd relied on previously.  It's a never
> > > ending battle to get all of the features required.
> > >
> > > The .so extensions option is a great feature that I'd like
> > to make use
> > > of.
> > >
> > > In trying to compile the gd .so extension (gd-1.8.4), I'm
> > receiving the
> > > following errors.  Any ideas?
> > >
> > > Thanks
> > > Chris Mulcahy
> > > ---
> > >
> > > Making all in ext
> > > make[1]: Entering directory
> > > `/home/cmulcahy/transfer/webserver/php-4.0.6/ext'
> > > Making all in gd
> > > make[2]: Entering directory
> > > `/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd'
> > > make[3]: Entering directory
> > > `/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd'
> > > gcc  -I.
> > -I/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd -I/home/cm
> > > ulcahy/transfer/webserver/php-4.0.6/main
> > -I/home/cmulcahy/transfer/webse
> > > rver/php-4.0.6
> > -I/home/cmulcahy/transfer/webserver/php-4.0.6/Zend -I/hom
> > > e/cmulcahy/transfer/webserver/php-4.0.6/ext/mysql/libmysql
> > -I/home/cmulc
> > > ahy/transfer/webserver/php-4.0.6/ext/xml/expat/xmltok
> > -I/home/cmulcahy/t
> > > ransfer/webserver/php-4.0.6/ext/xml/expat/xmlparse
> > -I/home/cmulcahy/tran
> > > sfer/webserver/php-4.0.6/TSRM  -DSUPPORT_UTF8
> > -DXML_BYTE_ORDER=12 -g -O2
> > >   -c gd.c && touch gd.lo
> > > gd.c:95: conflicting types for `gdIOCtx'
> > > /usr/local/include/gd_io.h:18: previous declaration of `gdIOCtx'
> > > gd.c: In function `php_if_imagecreatefromgif':
> > > gd.c:1209: `gdImageCreateFromGif' undeclared (first use in this
> > > function)
> > > gd.c:1209: (Each undeclared identifier is reported only once
> > > gd.c:1209: for each function it appears in.)
> > > gd.c: In function `php_if_imagegif':
> > > gd.c:1404: `gdImageGif' undeclared (first use in this function)
> > > make[3]: *** [gd.lo] Error 1
> > > make[3]: Leaving directory
> > > `/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd'
> > > make[2]: *** [all-recursive] Error 1
> > > make[2]: Leaving directory
> > > `/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd'
> > > make[1]: *** [all-recursive] Error 1
> > > make[1]: Leaving directory
> > > `/home/cmulcahy/transfer/webserver/php-4.0.6/ext'
> > > make: *** [all-recursive] Error 1
> > >
>
>
>
> --
> 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] Making gd Extensions

2001-08-29 Thread Dennis Moore

I am having a similar problem using gd-2.0.1 where the compilation complains
about "conflicting type gdIOCtx".  I am getting a knot on my forehead from
the wall in front of me.  Any ideas?

/dkm



- Original Message -
From: "Chris Mulcahy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001 9:31 AM
Subject: [PHP] Making gd Extensions

>
> The current item I'm wrestling with is the gd extensions.  I've rebuilt
> PHP and Apache so many times to enable one feature only to learn that I
> forgot to recompile one that I'd relied on previously.  It's a never
> ending battle to get all of the features required.
>
> The .so extensions option is a great feature that I'd like to make use
> of.
>
> In trying to compile the gd .so extension (gd-1.8.4), I'm receiving the
> following errors.  Any ideas?
>
> Thanks
> Chris Mulcahy
> ---
>
> Making all in ext
> make[1]: Entering directory
> `/home/cmulcahy/transfer/webserver/php-4.0.6/ext'
> Making all in gd
> make[2]: Entering directory
> `/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd'
> make[3]: Entering directory
> `/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd'
> gcc  -I. -I/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd -I/home/cm
> ulcahy/transfer/webserver/php-4.0.6/main -I/home/cmulcahy/transfer/webse
> rver/php-4.0.6 -I/home/cmulcahy/transfer/webserver/php-4.0.6/Zend -I/hom
> e/cmulcahy/transfer/webserver/php-4.0.6/ext/mysql/libmysql -I/home/cmulc
> ahy/transfer/webserver/php-4.0.6/ext/xml/expat/xmltok -I/home/cmulcahy/t
> ransfer/webserver/php-4.0.6/ext/xml/expat/xmlparse -I/home/cmulcahy/tran
> sfer/webserver/php-4.0.6/TSRM  -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2
>   -c gd.c && touch gd.lo
> gd.c:95: conflicting types for `gdIOCtx'
> /usr/local/include/gd_io.h:18: previous declaration of `gdIOCtx'
> gd.c: In function `php_if_imagecreatefromgif':
> gd.c:1209: `gdImageCreateFromGif' undeclared (first use in this
> function)
> gd.c:1209: (Each undeclared identifier is reported only once
> gd.c:1209: for each function it appears in.)
> gd.c: In function `php_if_imagegif':
> gd.c:1404: `gdImageGif' undeclared (first use in this function)
> make[3]: *** [gd.lo] Error 1
> make[3]: Leaving directory
> `/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/home/cmulcahy/transfer/webserver/php-4.0.6/ext/gd'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/home/cmulcahy/transfer/webserver/php-4.0.6/ext'
> make: *** [all-recursive] Error 1
>
>
>
> --
> 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: SV: [PHP] Sending alots of mail

2001-08-16 Thread Dennis Moore

Another alternative is to send the email message via majordomo or some other
mail list management utility.  The trick is how to manage the list
(subscribe and unsubscribe).  You have to make the decision whether or not
you want to use the MLM or your PHP/database application as the primary
control.   Then write your scripts to integrate the two.

/dkm

- Original Message -
From: "Daniel Adams" <[EMAIL PROTECTED]>
To: "Jimmy Bäckström" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 1:30 PM
Subject: Re: SV: [PHP] Sending alots of mail


> I've heard that qmail is better for a lot of things and easier to
> configure, but I've never actual used it.  Perhaps I'll give it a try next
> time i set one up.
> - Dan
>
>  On Thu, 16 Aug 2001, Jimmy Bäckström wrote:
>
> > Hmm that's what I thought about. But I think the system I'll be using
uses qmail. I've heard that qmail does things better than sendmail?
> >
> > /Jimmy
> > - Original Message -
> > From: Daniel Adams <[EMAIL PROTECTED]>
> > To: Jimmy Bäckström <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Thursday, August 16, 2001 6:21 PM
> > Subject: Re: [PHP] Sending alots of mail
> >
> >
> > I did something like that once.  Mine sent only about a few hundred at a
> > time and it was still quite a strain on the system because you have a
TON
> > of sendmail processes started and running at the same time. Just be
aware
> > of the possible system load.
> > - dan
> >
> > On Thu, 16 Aug 2001, Jimmy Bäckström wrote:
> >
> > > Hi list!
> > > I'm about to write an application that takes about 5000 mailadresses
from a database, and then sends a mail to each one of them. I haven't done
this kind of apps before, so I don't know if it's a good idea. Does anyone
have any suggestions?
> > >
> > > /Jimmy
> > >
> >
> >
>
> --
>
>
> --
> 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] Problems porting from MySQL Server to MSSQL7 Server

2001-04-04 Thread dennis moore



my_update("update sometable set col1=".$var1." where col2=".$var2);

and function:

function my_update($query){
global $host,$user,$psw,$name;
$conn=mssql_pconnect($host,user,psw) or die("Error: connection
failed!");
$rdb=mssql_select_db($name,$conn) or die("Error: DB does not exist");
$rez_q=mssql_query($query,$conn) or die("Error: Invalid SQL");
}

The same code and function work fine in MySQL. Why doesn't work in MSSQL
Server???


You need to fully examine your SQL statements against the format that MSSQL
wants to see.


-- 
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] mod_auth_mysql 2.20 won't compile with newer Apache and alloc.h vs ap_alloc.h

2001-04-02 Thread Dennis Moore

I ran into this problem last week.   I finally punted.   My configuration
is:  RH7, Apache 1.3.19, MySQL 3.23.36, mod_auth_mysql 2.20.   The strange
thing is that I did not have any problems with RH6.0, Apache1.3.12, MySQL
3.22.x, and mod_auth_mysql 2.20.

If you run into a fix, please copy me as well...

/dkm



- Original Message -
From: "Daevid Vincent" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 11:36 PM
Subject: [PHP] mod_auth_mysql 2.20 won't compile with newer Apache and
alloc.h vs ap_alloc.h


> trying to get Apache to compile with this keeps failing, complaining about
> "alloc.h" it seems. I notice that apache calls it "ap_alloc.h" now, but
the
> only reference in mod_auth _mysql is in:
>
> apMakefile.tmpl: $(INCDIR)/alloc.h $(INCDIR)/buff.h \
>
> but changing that doesn't fix the problem...
>
> this has been going on since like apache 1.3.1x and there is no newer
> mod_auth_mysql that I've found. I fixed this before, but I can't remember
> what I did. Could you please tell me how to fix this, and then put up a
> fixed version of mod_auth_mysql so other's don't run into this problem?
>
> apache 1.3.19, linux RH6.2, mysql, mod_auth_mysql 2.20:
>
> ===> src/modules/auth_mysql
> make[4]: *** No rule to make target `../../include/alloc.h', needed by
> `mod_auth_mysql.o'.  Stop.
> make[3]: *** [all] Error 1
> make[2]: *** [subdirs] Error 1
> make[2]: Leaving directory
`/data/usr/src/WT_Apache_Setup/apache_1.3.19/src'
> make[1]: *** [build-std] Error 2
> make[1]: Leaving directory `/data/usr/src/WT_Apache_Setup/apache_1.3.19'
> make: *** [build] Error 2
>
>
>
>
> --
> 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] PDF Output & Printing

2001-03-26 Thread dennis moore

I have a basic question regarding the printing quality using the PDF functions and 
lib.  

I need to place a high resolution image TIF or JPEG into a PDF file along with normal 
text from a database.  The desired output will be printed at 600dpi.  

Are there issues associated in doing this with the PDF lib?  I realize that the 
application uses 72 Postscript fonts.   I don't know what this means as far as 
printing.  Any ideas or suggestions?

Thanks,
/dkm



I need to print the output at 600dpi.



[PHP] PDF reading via IE5.5

2001-03-20 Thread Dennis Moore

I have searched long and hard to resolve this issue.  I've tried many
variations for the header tag.  However, I cannot seem to get it to work
with IE5.5.

I am trying to read an Acrobat created PDF file that I uploaded into my
MySQL database.

The problem occurs when I print the data via IE5.5.



All I get is echoing of the binary to the browser.

Any ideas or suggestions?

/dkm




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