php-windows Digest 10 Jan 2003 17:40:50 -0000 Issue 1528

Topics (messages 17737 through 17753):

Re: get row (latest by date)
        17737 by: Aidal

How can I send mail via PHP in HTML format?
        17738 by: Bednarik Boldizsar

TEXT
        17739 by: Bobo Wieland
        17740 by: Bobo Wieland
        17741 by: Bobo Wieland
        17742 by: Bobo Wieland
        17743 by: Bobo Wieland

TEXT (again)
        17744 by: Bobo Wieland
        17750 by: Warren Vail

Compiling PHP under Windows
        17745 by: Per Lundberg
        17748 by: Jean Baptiste FAVRE
        17751 by: Per Lundberg

New MIB to .index file
        17746 by: Vesa Laine

Writing to a text file
        17747 by: James Meers
        17749 by: Radovan Radic

HTTP 404 File not found error
        17752 by: paradiddles
        17753 by: Sjon

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 ---
Yes, somone replied directly to me with this idea "ODER BY date DESC, time
DESC", and this seems to work just fine.

Thanks :)

"Joseph W. Goff" <[EMAIL PROTECTED]> wrote in message
001601c2b7f6$342d0a40$bdcaa8c0@jg42000">news:001601c2b7f6$342d0a40$bdcaa8c0@jg42000...
> Actually, mysql does not support sub-selects.
> You can do this however with something like this:
>
> select * from your_table order by date_column desc, time_column desc limit
1
> ----- Original Message -----
> From: "Radovan Radic" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 09, 2003 9:46 AM
> Subject: [PHP-WIN] Re: get row (latest by date)
>
>
> > select * from table where date=(select max(date) from table) and
> > time=(select max(time) from table)
> >
> > HTH,
> > Radovan
> >
> > "Aidal" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Hi NG.
> > >
> > > I know this is probably very simple, but I've had no luck making it
work
> > :(
> > >
> > > I want 1 single row out of a table, that row must be the latest by
date
> > and
> > > time.
> > >
> > > The table looks like this (example MySQL):
> > > _______________________________________________
> > >   id  | type_id |       date       |      time   |      title        |
> > > source  |
> > > ---------------------------------------------------------------
> > >  128 |     1      | 2003-01-09 | 15:00:52 | some title    | blabla
|
> > >  129 |     1      | 2003-01-09 | 15:02:43 | some title 2 | blabla 2 |
> > > ---------------------------------------------------------------
> > >
> > > What i need is the SQL that would give me the latest created row of
> these
> > 2
> > > (i dont mean latest as in last_id) by date and time in this case the
> > result
> > > should be the row with id = 129 because of the time.
> > >
> > > Please help...
> > >
> > > ~ Aidal
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


--- End Message ---
--- Begin Message ---
How can I send mail via PHP in HTML format?
Any suggestion?

Thanks in advance.
--- End Message ---
--- Begin Message ---
Hi everybody!

--- End Message ---
--- Begin Message ---
Hi everybody!

--- End Message ---
--- Begin Message ---
Hi everybody!

--- End Message ---
--- Begin Message ---
Hi everybody!

--- End Message ---
--- Begin Message ---
Hi everybody!

I'm new to this list and joind because I ran in to some trouble last
night... I'm developing a medium sized web site where you should be able to
post questions and get them answered, sort of a faq. Anyway - both the
question field and the anwser field are stored as TEXT in a MySQL db. When
these fields get larger then just your average question it mocks up my
php-scripts real bad. As I've understood there is some values in the php.ini
that might do the trick - but I would prefer not to change these. And
besides, I don't think that the the fields have been that big when I tried
it so that it would run in to these limits.
    Anyway to explain my problem a bit more; I did some stupid things when I
first started to script the page. I did three variables $xhtmlstart,
$xhtmlend and $xhtmlmenu. The first and second explains them selfe, right?
But the last is a menu where you can choose questions. It shows the last ten
questions in all categories, and there can be n categories... The reason I
made these three variables is that I thought that it might be faster to do
de db work once and then just display the variable. I haven't been in to php
that long so I'm learning as I go... I've been pasing these three variables
as POST-variables that I rawurldecoded... maybe I should use session
variables or just do the db work over and over again?!
    Anyway, when choosing a question that has loads of text put in to it, IE
tries to reload the page several times and eventually stops only displaying
the accual new xhtml-code I've echoed out on that page, skipping the POST,
variables and skipping the questions output. In Mozilla it works as it
should most of the tim and in Opera 6 and 7 it starts out okej but the
script aborts half-way through only displaying $xhtmlstart and 2/3 of the
big question...

Could you give me some hint on this one? What to do with the variables, and
how to work around the problem with large amount of data? There isn't some
MySQL type that goes in between VARCHAR/TINYTEXT and TEXT, right?

If it helps I'm using Win XP, Apache 2.0.40, PHP 4.0.4, MySQL 4.0.3-beta and
I echo out my pages to work with the XHTML standard...


- Bobo Wieland, Sweden.
[EMAIL PROTECTED] www.elstudion.com www.elstudion.com/bobo


--- End Message ---
--- Begin Message ---
Sorry about this. My mailserver hates me ;)

Hi everybody!

I'm new to this list and joind because I ran in to some trouble last
night... I'm developing a medium sized web site where you should be able to
post questions and get them answered, sort of a faq. Anyway - both the
question field and the anwser field are stored as TEXT in a MySQL db. When
these fields get larger then just your average question it mocks up my
php-scripts real bad. As I've understood there is some values in the php.ini
that might do the trick - but I would prefer not to change these. And
besides, I don't think that the the fields have been that big when I tried
it so that it would run in to these limits.
    Anyway to explain my problem a bit more; I did some stupid things when I
first started to script the page. I did three variables $xhtmlstart,
$xhtmlend and $xhtmlmenu. The first and second explains them selfe, right?
But the last is a menu where you can choose questions. It shows the last ten
questions in all categories, and there can be n categories... The reason I
made these three variables is that I thought that it might be faster to do
de db work once and then just display the variable. I haven't been in to php
that long so I'm learning as I go... I've been pasing these three variables
as POST-variables that I rawurldecoded... maybe I should use session
variables or just do the db work over and over again?!
    Anyway, when choosing a question that has loads of text put in to it, IE
tries to reload the page several times and eventually stops only displaying
the accual new xhtml-code I've echoed out on that page, skipping the POST,
variables and skipping the questions output. In Mozilla it works as it
should most of the tim and in Opera 6 and 7 it starts out okej but the
script aborts half-way through only displaying $xhtmlstart and 2/3 of the
big question...

Could you give me some hint on this one? What to do with the variables, and
how to work around the problem with large amount of data? There isn't some
MySQL type that goes in between VARCHAR/TINYTEXT and TEXT, right?

If it helps I'm using Win XP, Apache 2.0.40, PHP 4.0.4, MySQL 4.0.3-beta and
I echo out my pages to work with the XHTML standard...


- Bobo Wieland, Sweden.
[EMAIL PROTECTED] www.elstudion.com www.elstudion.com/bobo




--- End Message ---
--- Begin Message ---
My memory could be failing me, but I seem to recall storing 65K characters
in a TEXT column.

(from the manual)
TINYBLOB, TINYTEXT - A BLOB or TEXT column with a maximum length of 255
(2^8 - 1) characters.
BLOB, TEXT - A BLOB or TEXT column with a maximum length of 65535 (2^16 - 1)
characters.
MEDIUMBLOB MEDIUMTEXT - A BLOB or TEXT column with a maximum length of
16777215 (2^24 - 1) characters.
LONGBLOB LONGTEXT - A BLOB or TEXT column with a maximum length of
4294967295 (2^32 - 1) characters.

Have you checked your form for the potential truncation?
I suspect there is a default maximum for type=Text input controls.
Textarea works better, but you need to filter for printable characters as
some control characters in the data will cause presentation problems.
I also have experienced one instance of truncation because I forgot to use
method=post.  There is a limit on URL Lengths.

hope this gives you a few places to look.

Warren Vail
[EMAIL PROTECTED]


-----Original Message-----
From: Bobo Wieland [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] TEXT (again)


Sorry about this. My mailserver hates me ;)

Hi everybody!

I'm new to this list and joind because I ran in to some trouble last
night... I'm developing a medium sized web site where you should be able to
post questions and get them answered, sort of a faq. Anyway - both the
question field and the anwser field are stored as TEXT in a MySQL db. When
these fields get larger then just your average question it mocks up my
php-scripts real bad. As I've understood there is some values in the php.ini
that might do the trick - but I would prefer not to change these. And
besides, I don't think that the the fields have been that big when I tried
it so that it would run in to these limits.
    Anyway to explain my problem a bit more; I did some stupid things when I
first started to script the page. I did three variables $xhtmlstart,
$xhtmlend and $xhtmlmenu. The first and second explains them selfe, right?
But the last is a menu where you can choose questions. It shows the last ten
questions in all categories, and there can be n categories... The reason I
made these three variables is that I thought that it might be faster to do
de db work once and then just display the variable. I haven't been in to php
that long so I'm learning as I go... I've been pasing these three variables
as POST-variables that I rawurldecoded... maybe I should use session
variables or just do the db work over and over again?!
    Anyway, when choosing a question that has loads of text put in to it, IE
tries to reload the page several times and eventually stops only displaying
the accual new xhtml-code I've echoed out on that page, skipping the POST,
variables and skipping the questions output. In Mozilla it works as it
should most of the tim and in Opera 6 and 7 it starts out okej but the
script aborts half-way through only displaying $xhtmlstart and 2/3 of the
big question...

Could you give me some hint on this one? What to do with the variables, and
how to work around the problem with large amount of data? There isn't some
MySQL type that goes in between VARCHAR/TINYTEXT and TEXT, right?

If it helps I'm using Win XP, Apache 2.0.40, PHP 4.0.4, MySQL 4.0.3-beta and
I echo out my pages to work with the XHTML standard...


- Bobo Wieland, Sweden.
[EMAIL PROTECTED] www.elstudion.com www.elstudion.com/bobo





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



--- End Message ---
--- Begin Message --- Hey Windows PHP people,

I am trying to compile PHP 4.2.3 under Windows with Visual C++ 6.0. However, I am not being very successful. Do I need any special libraries/etc to get this working? (I am trying to build the php4dllts project in the win32 directory, for use as an embedded library in another application)

I realized that inet/arpa.h et al did not exist so I replaced them for winsock.h. Still, I am getting strange problems that FD_SETSIZE (a #define in winsock.h) has not been defined, even though winsock.h has been properly included. This is when trying to compile ext/ftp/ftp.c. Does anyone recognize this, and does anyone have a proper fix?

--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com


--- End Message ---
--- Begin Message ---
Hi,
For compiling PHP itself, all you need is writen in the doc:
http://www.php.net/manual/en/install.windows.php
In order to compile some extensions, you'll need external libraries.
Generaly, it's writen in the doc too.

FAVRE Jean Baptiste


"Per Lundberg" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Hey Windows PHP people,
>
> I am trying to compile PHP 4.2.3 under Windows with Visual C++ 6.0.
However, I
>   am not being very successful.  Do I need any special libraries/etc to
get this
> working?  (I am trying to build the php4dllts project in the win32
directory,
> for use as an embedded library in another application)
>
> I realized that inet/arpa.h et al did not exist so I replaced them for
> winsock.h.  Still, I am getting strange problems that FD_SETSIZE (a
#define in
> winsock.h) has not been defined, even though winsock.h has been properly
> included.  This is when trying to compile ext/ftp/ftp.c.  Does anyone
recognize
> this, and does anyone have a proper fix?
>
> --
> Best regards,
>
> Per Lundberg / Capio ApS
> Phone: +46-18-4186040
> Fax: +46-18-4186049
> Web: http://www.capio.com
>
>


--- End Message ---
--- Begin Message ---
Jean Baptiste FAVRE wrote:

Hey Jean-Baptiste,

For compiling PHP itself, all you need is writen in the doc:
http://www.php.net/manual/en/install.windows.php
In order to compile some extensions, you'll need external libraries.
Generaly, it's writen in the doc too.
Thank you! For some reason, I didn't see these build instructions; I took for granted that it would be in the source archive itself... I'll try following these instructions and let's see what turns out.

--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com


--- End Message ---
--- Begin Message ---
Hi,
can I insert a new MIB file name in .index file and the corresponding
MIB file in mibs directorywithout recompiling the binary?

Vesa


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

I want to create a sort of log/text file, everytime I run a query or
something I would like to write/append it to a text file. Does anyone
know what function I can use for this? Or even any examples?

Cheers

James
--- End Message ---
--- Begin Message ---
$fp=fopen("file.log","a+");
fputs($fp,"message...\n");
fclose($fp);


"James Meers" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,

I want to create a sort of log/text file, everytime I run a query or
something I would like to write/append it to a text file. Does anyone
know what function I can use for this? Or even any examples?

Cheers

James


--- End Message ---
--- Begin Message ---
Hey everyone,

I installed php 4.3.0-win32, mysql-3.23.54-win and apache_1.3.27 on Win2000 last week, 
followed instal directions (from the manual) as best I could. 

For testing purposes, I created a file called phpinfo.php. When I try and load it 
locally, my browser returns the HTTP 404 File not found error.

I've been troubleshooting this for week now and have posted some questions dealing 
with this problem earlier.

As a final attempt to get this resolved, I'm requesting someone who has the exact same 
setup that I do, send me their php.ini and httpd.config files so I can compare them to 
my own. Along with the files, I request that you send me any preliminary installation 
steps that I may have overlooked.

Otherwise, I'm tempted to abort this process and download everything again starting 
from scratch (which I really hope to avoid unless I have no other option). I'm not 
giving up!

Thanks-

Patrick



----------------
"you can observe a lot by watching"

  ~ Yogi Berra



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--- End Message ---
--- Begin Message ---
-----Original Message-----
From: paradiddles [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 17:47 pm
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] HTTP 404 File not found error

>send me their php.ini and httpd.config files so I can compare them to my
own.

nah, if you can't get it to work by reading the docs, those won't do you no
good either...
Assuming:
- Apache is installed in C:\Apache (with your conf @
C:\Apache\conf\httpd.conf)
- PHP is installed in C:\PHP (with the apache sapi @
C:\PHP\sapi\php4apache.dll)
- you're using an unmodified httpd.conf that got installed when installing
Apache

1: find the LoadModule directives in your httpd.conf. they are commented out
    by default (# at beginning of line). Add the following after those
lines:
        LoadModule php4_module C:/PHP/sapi/php4apache.dll

2: check if there is a ClearModuleList + bunch of AddModule directives after
those
    LoadModule directives. If so, add the following line after all other
AddModule's:
        AddModule mod_php4.c

3: search for AddHandler in your httpd.conf. add the following 2 lines:
        AddHandler application/x-httpd-php .php .php3
        AddHandler application/x-httpd-php-source .phps
    (eg: after the commented out "AddHandler cgi-script .cgi"

4: start apache from the command line.
    (Start -> Run -> cmd <enter> -> cd Apache <enter> -> apache <enter>)
    if there are errors, correct them. (I doubt there will be)

5: put a phpinfo.php in your htdocs directory (C:\Apache\htdocs\phpinfo.php)
    with the known contents <?php phpinfo(); ?>

6: request http://localhost/phpinfo.php from your favourite browser


These 6 steps are almost fool-proof, and are sure to get php working on your
box. substitute the above paths with your installation paths. don't forget
to use
forward slashes, and quotes if your paths have spaces in them.

If you still get 404's or other errors, check your error log
(C:\Apache\logs\error.log)
that's the first place to look when recieving errors :)


When the Apache+PHP combo works, you can configure php by putting a copy of
php.ini-recommended or php.ini-dist as php.ini in your windows dir
(C:\WINNT), or
as php-apache.ini if you want diffrent configurations for eg: apache & cli


Goodluck :)


Sjon.

--- End Message ---

Reply via email to