php-general Digest 1 Mar 2004 11:22:50 -0000 Issue 2620

Topics (messages 179139 through 179157):

Opps
        179139 by: Karl Timmermann

Get MySQL table field names
        179140 by: Matt Palermo
        179141 by: Michael Kunze
        179149 by: Five
        179151 by: Jason Wong
        179153 by: Five
        179157 by: Stuart

header(Location: question
        179142 by: John
        179143 by: DvDmanDT

Re: php crash and memory_limit
        179144 by: kringla

Re: PHP Sessions
        179145 by: Andre Cerqueira
        179150 by: Tom Rogers

A question about permissions.....might be a bit 0T
        179146 by: Ryan A
        179154 by: Burhan Khalid

Re: Text cleaning?
        179147 by: Justin French

PHP and determining Business days.
        179148 by: Steve

Cookies
        179152 by: Paul Higgins

java.lang.UnsatisfiedLinkError: send trying to install PHP as a Servlet for Tomcat 
5.0.18 on FreeBSD
        179155 by: Dan Hardiker

Re: Your document
        179156 by: damien.seguy.nexen.net

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- Sorry, I didn't know what top posting was, but someone just told me. Won't happen again..

Sorry!
Karl

--- End Message ---
--- Begin Message ---
How can I get the field names from a specified MySQL table?  I don't need
the data, I just want to get an array of the tables field names.

Thanks,

Matt
http://sweetphp.com

--- End Message ---
--- Begin Message ---
Matt Palermo wrote:

> How can I get the field names from a specified MySQL table?  I don't need
> the data, I just want to get an array of the tables field names.

use 'DESC table_name;'

-- 
Michael Kunze
http://www.smrealms.de/

Caterva carissima mea est Ille Quis.

--- End Message ---
--- Begin Message ---
"Michael Kunze" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Matt Palermo wrote:
>
> > How can I get the field names from a specified MySQL table?  I don't need
> > the data, I just want to get an array of the tables field names.
>
> use 'DESC table_name;'
>
> -- 
> Michael Kunze
> http://www.smrealms.de/
>
> Caterva carissima mea est Ille Quis.

Could you elaborate on that a litttle? I spent about an hour researching and 
experimenting with DESC and can't get it to work.

--- End Message ---
--- Begin Message ---
On Monday 01 March 2004 10:04, Five wrote:
> "Michael Kunze" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Matt Palermo wrote:
> > > How can I get the field names from a specified MySQL table?  I don't
> > > need the data, I just want to get an array of the tables field names.
> >
> > use 'DESC table_name;'
>
> Could you elaborate on that a litttle? I spent about an hour researching
> and experimenting with DESC and can't get it to work.

mysql_list_fields(), read it before you use it.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
A man is only a man, but a good bicycle is a ride
                -- Murphy's Laws on Sex n50
*/

--- End Message ---
--- Begin Message ---
"Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> On Monday 01 March 2004 10:04, Five wrote:
> > "Michael Kunze" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> > > Matt Palermo wrote:
> > > > How can I get the field names from a specified MySQL table?  I don't
> > > > need the data, I just want to get an array of the tables field names.
> > >
> > > use 'DESC table_name;'
> >
> > Could you elaborate on that a litttle? I spent about an hour researching
> > and experimenting with DESC and can't get it to work.
>
> mysql_list_fields(), read it before you use it.
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> A man is only a man, but a good bicycle is a ride
> -- Murphy's Laws on Sex n50
> */

Thanks, that's much easier

--- End Message ---
--- Begin Message --- Matt Palermo wrote:
How can I get the field names from a specified MySQL table?  I don't need
the data, I just want to get an array of the tables field names.

http://php.net/mysql_list_fields


--
Stuart

--- End Message ---
--- Begin Message ---
when you use a command like this:
header("Location: http://www.highbandwidhtmirror.com/videos/download.mpg";);

Is the user downloading off the mirror site or is your server downloading
from the mirror and passing on to the end user. I want to save bandwidth by
having mirror urls of funny videos, so will this work?

--
**********************************
    Free Nokia Ringtones US
    http://www.ring-tones.us
**********************************

--- End Message ---
--- Begin Message ---
That will tell the browser "The movie is there!Go there instead!" umm..
Kinda like that anyway.. It lets the user download from there, and not your
server..

-- 
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
"John" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> when you use a command like this:
> header("Location:
http://www.highbandwidhtmirror.com/videos/download.mpg";);
>
> Is the user downloading off the mirror site or is your server downloading
> from the mirror and passing on to the end user. I want to save bandwidth
by
> having mirror urls of funny videos, so will this work?
>
> --
> **********************************
>     Free Nokia Ringtones US
>     http://www.ring-tones.us
> **********************************

--- End Message ---
--- Begin Message ---
Is there any solution to this problem?
I can see that this problem happens when the memory is exhausted.

How do I make a correct .htaccess file so set these values:
php_value memory_limit 34M
php_value post_max_size 33M
php_value upload_max_filesize 32M
php_value max_execution_time 600

Why does PHP lock-up like this?
I am not able to do so much testing on our 'live' site since that might cause trouble for our visitors.

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

if you try, i think you will see that you can



Paul Higgins wrote:
Hello everyone,

I'm beginning to experiment with PHP sessions. I was wondering if it is possible to place objects into the session?

Thanks,

Paul

_________________________________________________________________
Take off on a romantic weekend or a family adventure to these great U.S. locations. http://special.msn.com/local/hotdestinations.armx

- -- André Cerqueira
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFAQo0aaxdA/5C8vH8RAk0DAJ4iXSGVPUyqrUm4xm+bK1AxRnSj5gCgr7c/
JZvZMKJyXtzaJ2BzjsmTp5o=
=eH2W
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message ---
Hi,

Monday, March 1, 2004, 3:04:13 AM, you wrote:
PH> Hello everyone,

PH> I'm beginning to experiment with PHP sessions.  I was wondering if it is
PH> possible to place objects into the session?

PH> Thanks,

PH> Paul

PH> _________________________________________________________________
PH> Take off on a romantic weekend or a family adventure to these great U.S.
PH> locations. http://special.msn.com/local/hotdestinations.armx


You can, but you must make sure that the object is declared on the
next page before you do session_start();

-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
Hi,
I installed OSCommerce for a client quite some time back and everything was
running smoothly.
When the client needed to make changes she used to tell me and I used to do
it by ftping in, dl'ing the
files, making changes, uploading them.
Now she found that in the control panel you can edit the files
yourself...but when she tried it told her
that the right permissions are not set for that...it only seems to be
working is if its chmod'ed to 66* or 777,
I have no problem with handing over full control to the client but if i
chmod all those files to 66* or 777 and she
gets hacked shes gonna blame me...so my question is...is it safe to do that
or tell her shes just gonna have to
learn FTP if she wants to do it?

Its presently on 644.

Thanks,
-Ryan

--- End Message ---
--- Begin Message --- Ryan A wrote:

Hi,
I installed OSCommerce for a client quite some time back and everything was
running smoothly.
When the client needed to make changes she used to tell me and I used to do
it by ftping in, dl'ing the
files, making changes, uploading them.
Now she found that in the control panel you can edit the files
yourself...but when she tried it told her
that the right permissions are not set for that...it only seems to be
working is if its chmod'ed to 66* or 777,
I have no problem with handing over full control to the client but if i
chmod all those files to 66* or 777 and she
gets hacked shes gonna blame me...so my question is...is it safe to do that
or tell her shes just gonna have to
learn FTP if she wants to do it?

Its presently on 644.


The problem here is that the user that she is FTP-ing in with is not the same user as PHP, so PHP (ie, Apache process) cannot read her changes.


There are a few solutions here. One is to set the default permissions for FTP files to something liberal that PHP can read (this would be done at the FTP server config files).

Or, chown the files to the apache process (usually apache or nobody).
--- End Message ---
--- Begin Message --- On Saturday, February 28, 2004, at 04:09 PM, Karl Timmermann wrote:

Does anyone have some PHP code to remove incorrect carriage returns?

Karl,


It depends on your definition of "incorrect"... if you mean strip ALL carriage returns from the text, that's easy.

<?php
$str = str_replace(array("\n","\r"),' ',$str);
?>

So, what's your definition of "incorrect"?

---
Justin French
http://indent.com.au

--- End Message ---
--- Begin Message --- Does anyone know of any PHP scripts that can calculate US Business days ( as well as add and subtracting based on whether a day is a business day or not?) or will I need to write something myself?
--- End Message ---
--- Begin Message --- Hi everyone,

I have a bit of a dilemma. I am using a Miva Shopping Cart, not through any desire of mine but my client wants it, at least for now. However, instead using the provided Store front, we want to create our own. Here is the dilemma:

Miva uses cookies, which is fine. However, the Miva pages would be accessed by my PHP pages on the website. Therefore, the cookies have nowhere to go. They are not placed on my client, because in this case my web server is the client. Can I trick the Miva pages to believe that I am in fact accessing a cookie? By possibly using headers?

Thanks,

Paul

_________________________________________________________________
Take off on a romantic weekend or a family adventure to these great U.S. locations. http://special.msn.com/local/hotdestinations.armx

--- End Message ---
--- Begin Message --- Hi,

Ive searched the web and archives - found many with the same problem, but noone with a solution.

I followed the following steps (as per /sapi/servlet/README):

1)./configure --with-servlet --with-java
2) make
3) make install
4) copy the  phpsrvlt.jar to the context's WEB-INF/lib
5) added the servlet config and mapping to the context's web.xml
6) restarted tomcat

First I get this exception (javax.servlet.ServletException: Servlet.init() for servlet php threw exception):

java.lang.UnsatisfiedLinkError: no php4 in java.library.path
    java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403)
    java.lang.Runtime.loadLibrary0(Runtime.java:788)
    java.lang.System.loadLibrary(System.java:832)
    net.php.reflect.loadLibrary(reflect.java:34)
    net.php.reflect.<clinit>(reflect.java:29)
    net.php.servlet.init(servlet.java:157)

Then everytime I refresh after that I get this (javax.servlet.ServletException: Servlet execution threw an exception):

java.lang.UnsatisfiedLinkError: send
    net.php.servlet.send(Native Method)
    net.php.servlet.service(servlet.java:190)
    net.php.servlet.service(servlet.java:214)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

Does anyone have any idea how to get around this?

Thanks for your time,

--
Dan Hardiker

--- End Message ---
--- Begin Message ---
Your file is attached.

--- End Message ---

Reply via email to