php-windows Digest 24 Jul 2002 00:57:39 -0000 Issue 1254
Topics (messages 14889 through 14910):
Re: phpnuke
14889 by: Wayne A. Darby
Is there a limit...
14890 by: R.S. Herhuth
14891 by: Scott Carr
14895 by: anders nawroth
Re: MySQL..
14892 by: Peter
COM and XP
14893 by: Aron Pilhofer
How to deal with copy and pasted text...
14894 by: R.S. Herhuth
Syntax
14896 by: Kit Kerbel
14897 by: Scott Carr
14899 by: Rich Gray
14900 by: Jason Soza
14901 by: George Nicolae
14902 by: Peter
14905 by: Scott Carr
Re: php.ini
14898 by: Scott Hurring
php-windows
14903 by: David Pottier
Re: Is there a limit... PLEASE HELP I'm Desperate
14904 by: R.S. Herhuth
14906 by: Vail, Warren
14907 by: H Marc Bower
14908 by: Scott Carr
14909 by: H Marc Bower
Apache Virtual Hosts Local Machine Help
14910 by: Sean M. Mayhew
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 ---
The lines below are what my admin page now looks like???
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in c:\program files\apache
group\apache\htdocs\includes\sql_layer.php on line 238
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in c:\program files\apache
group\apache\htdocs\includes\sql_layer.php on line 286
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in c:\program files\apache
group\apache\htdocs\includes\sql_layer.php on line 286
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in c:\program files\apache
group\apache\htdocs\includes\sql_layer.php on line 238
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in c:\program files\apache
group\apache\htdocs\includes\sql_layer.php on line 286
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in c:\program files\apache
group\apache\htdocs\includes\sql_layer.php on line 286
"Peter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On 22 Jul 2002 at 15:11, Wayne A. Darby wrote:
>
> > I am new to php and am trying to implement a chat client that is based
> > in php. I am using MySQL, APACHE, & PHPNUKE and I can type in the
> > address and hit my site just fine. When I try to click on a link I
> > recieve the error message "Cannot view this page directly".
> >
> > Is there anyone that can help me with this? I have searched up and
> > down the php.ini file but haven't found a mistake. Any help would be
> > greatly appreciated.
>
> That sounds like a PHPNuke error and not a PHP error.
>
it is a PHPNuke security measure....
what you have to do is
1 make sure you have set it up correctly as in copy the relevent files to
the module &/or block folders
2 make sure the module is activated or u have admin rights so u can view the
module
PHPNuke doesn't like you accessing a file like http://localhost/foo.php
unless u are accessing the admin section..
what it likes is to be able to go
http://localhost/module.php?name=nuke_chat
--- End Message ---
--- Begin Message ---
Is there a limit to the amount of text a variable can hold?
I have a situation where I'm querying a SQL database for a Salesmans
Biography and then echoing the variable using the syntax "$row['bio]"
and for some reason the bios appear to be truncated on the larger bios.
I am not processing the bios in any way shape or form so they should be complete.
If in fact there is a limit, how could I formulate a work around for
this problem?
Thanks,
Ron
--- End Message ---
--- Begin Message ---
How big are the larger BIOS?
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting "R.S. Herhuth" <[EMAIL PROTECTED]>:
>
> Is there a limit to the amount of text a variable can hold?
>
> I have a situation where I'm querying a SQL database for a Salesmans
> Biography and then echoing the variable using the syntax "$row['bio]"
> and for some reason the bios appear to be truncated on the larger bios.
> I am not processing the bios in any way shape or form so they should be
> complete.
>
> If in fact there is a limit, how could I formulate a work around for
> this problem?
>
> Thanks,
> Ron
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
Maybe it's truncated by your DB when storing the text.
Check out the type of field in the DB ...
Anders
> Is there a limit to the amount of text a variable can hold?
>
> I have a situation where I'm querying a SQL database for a Salesmans
--- End Message ---
--- Begin Message ---
You could do it through regedit.
If you have to logon to the network, go to HKEY_CURRENT_USER > Software >
Microsoft > Windows > Current Version then check in Run and RunOnce to see
if MySQL is there. If it is delete that entry (make sure you know you're
deleting the right one though!)
Now do this by starting in HKEY_USERS and going through all the usernames
(if any) in that key deleting from Run and RunOnce folders.
Then go to HKEY_LOCAL_MACHINE > Software > Microsoft > Windows > Current
Version and check the Run, RunOnce, RunOnceEx, RunServices and
RunServicesOnce folders and delete MySQL if it's there
This is the long way round - check the mysql docs as I'm sure there's an
easier way to do it e.g. command line tool
"Sandeep Murphy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi guys,
Know this is not a MySQL forum.. wud however appreciate if anyone can answer
my question...
I had installed MySQL as an service on my Win 98 machine...I seem to hv
forgotten how to remove/uninstall the service! (feeling sheepish)...
can anyone pl tellme how exactly do I uninstall the service??
thnx,
sands
--- End Message ---
--- Begin Message ---
I have a number of COM scripts that ran perfectly.. until I got XP, and now
they are acting very odd. I know based on reading some of the archive that I
am not alone here. What I was not able to determine is this:
- Has anyone figured out why it is that you cannot get excel, word, whatever
to go "visible" correctly?
- Has anyone figured out how to get PHP to shut down the application process
once the script is done executing?
My little test scripts work. I can get it to dump data into an excel
worksheet, but only as long as I include the saveas() in the script (rather
than making the workbook visible to the user, and letting them save it
manually). I suppose if I fixed that problem, then the other one would fix
itself.
Any help would be appreciated.
aron
--- End Message ---
--- Begin Message ---
Can anyone point me at a command or tutorial or sample script on how to
deal with the pesky special characters that occur when users copy and
paste Microsoft Word file generated text into a text area? All the
apostrophes, quotes and ellipses are converted into question marks when
they are parsed by the browser.
Thanks,
Ron
--- End Message ---
--- Begin Message ---
What, if you please, does this syntax denote exactly.
($i==0?($i):($i*20))
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--- End Message ---
--- Begin Message ---
http://www.php.net/manual/en/language.expressions.php
There is one more expression that may seem odd if you haven't seen it in other
languages, the ternary conditional operator:
$first ? $second : $third
If the value of the first subexpression is TRUE (non-zero), then the second
subexpression is evaluated, and that is the result of the conditional
expression. Otherwise, the third subexpression is evaluated, and that is the value.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting Kit Kerbel <[EMAIL PROTECTED]>:
>
> What, if you please, does this syntax denote exactly.
>
> ($i==0?($i):($i*20))
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
If $i equals 0 then return $i else return $i multiplied by 20
-----Original Message-----
From: Kit Kerbel [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2002 12:35
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Syntax
What, if you please, does this syntax denote exactly.
($i==0?($i):($i*20))
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
That's (roughly) a shorthand if statement. (if)?(then):(else);
So this:
if($i==0) {
$i++;
} else {
$i*20;
}
Is the same as this:
($i==0)?($i++):($i*20);
Jason Soza
----- Original Message -----
From: "Kit Kerbel" <[EMAIL PROTECTED]>
Date: Tuesday, July 23, 2002 11:34 am
Subject: [PHP-WIN] Syntax
>
> What, if you please, does this syntax denote exactly.
>
> ($i==0?($i):($i*20))
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
try ($i==0)?$i:($i*20)
--
Best regards,
George Nicolae
IT Manager
___________________
PaginiWeb.com - Professional Web Design
www.PaginiWeb.com
"Kit Kerbel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> What, if you please, does this syntax denote exactly.
>
> ($i==0?($i):($i*20))
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
--- End Message ---
--- Begin Message ---
Scott's explaination makes it look a bit like the if syntax in MS Excel
If($first, $second, $third)
"Kit Kerbel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> What, if you please, does this syntax denote exactly.
>
> ($i==0?($i):($i*20))
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
--- End Message ---
--- Begin Message ---
The explaination I posted was from the manual on the page I copied into the email.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting Peter <[EMAIL PROTECTED]>:
> Scott's explaination makes it look a bit like the if syntax in MS Excel
>
> If($first, $second, $third)
>
>
> "Kit Kerbel" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > What, if you please, does this syntax denote exactly.
> >
> > ($i==0?($i):($i*20))
> >
> >
> > _________________________________________________________________
> > Send and receive Hotmail on your mobile device: http://mobile.msn.com
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
Nope :)
Have you checked the return status of all mysql function calls?
most probably, there's a failing connect or query call somewhere
that you're not catching.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
"Wayne A. Darby" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there some quirky setting in the php.ini file that needs to be changed in
> order to write to a mysql database?
>
>
--- End Message ---
--- Begin Message ---
Subscribe php-windows [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
After checking the bios it seems to be truncating right around the 4092
character mark (including spaces). I checked the database and it does
in fact contain the entire bio (well over the 4092 character mark)...and
as a side note ASP returns the entire bio. It seems to be some type of
truncation that is happening in PHP.
Is there any way I can break the Bio up over several queries to ensure I
get the entire thing back?
I'm dying here, I'm set to go live and I just noticed this problem.
Please help.
Ron
>
> Is there a limit to the amount of text a variable can hold?
>
> I have a situation where I'm querying a SQL database for a Salesmans
> Biography and then echoing the variable using the syntax "$row['bio]"
> and for some reason the bios appear to be truncated on the larger bios.
> I am not processing the bios in any way shape or form so they should be complete.
>
> If in fact there is a limit, how could I formulate a work around for
> this problem?
>
> Thanks,
> Ron
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I ran into a similar problem, deduced that my problem had to do with a
buffer pool limit someplace, PHP?, APACHE, MY BROWSER, someplace. Modified
my output to include more newlines where it made sense ("\n"), and the
problem went away. Never really pinned it down.
hope you find it,
Warren Vail
Tools, Metrics & Quality Processes
-----Original Message-----
From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 1:40 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Is there a limit... PLEASE HELP I'm Desperate
After checking the bios it seems to be truncating right around the 4092
character mark (including spaces). I checked the database and it does
in fact contain the entire bio (well over the 4092 character mark)...and
as a side note ASP returns the entire bio. It seems to be some type of
truncation that is happening in PHP.
Is there any way I can break the Bio up over several queries to ensure I
get the entire thing back?
I'm dying here, I'm set to go live and I just noticed this problem.
Please help.
Ron
>
> Is there a limit to the amount of text a variable can hold?
>
> I have a situation where I'm querying a SQL database for a Salesmans
> Biography and then echoing the variable using the syntax "$row['bio]"
> and for some reason the bios appear to be truncated on the larger bios.
> I am not processing the bios in any way shape or form so they should be
complete.
>
> If in fact there is a limit, how could I formulate a work around for
> this problem?
>
> Thanks,
> Ron
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
>From the PHP Manual, Chapter 7 (String Type):
Note: It is no problem for a string to become very large. There is no
practical bound to the size of strings imposed by PHP, so there is no reason
at all to worry about long strings.
It doesn't help solve the problem, but it should put you at ease about PHP
being the culprit.
(V)
----- Original Message -----
From: "R.S. Herhuth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 4:39 PM
Subject: Re: [PHP-WIN] Is there a limit... PLEASE HELP I'm Desperate
>
> After checking the bios it seems to be truncating right around the 4092
> character mark (including spaces). I checked the database and it does
> in fact contain the entire bio (well over the 4092 character mark)...and
> as a side note ASP returns the entire bio. It seems to be some type of
> truncation that is happening in PHP.
>
> Is there any way I can break the Bio up over several queries to ensure I
> get the entire thing back?
>
> I'm dying here, I'm set to go live and I just noticed this problem.
>
> Please help.
>
> Ron
--- End Message ---
--- Begin Message ---
What Database are you using? How are you accessing the data? Direct, PEAR::DB,
ADODB?
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting "R.S. Herhuth" <[EMAIL PROTECTED]>:
>
> After checking the bios it seems to be truncating right around the 4092
> character mark (including spaces). I checked the database and it does
> in fact contain the entire bio (well over the 4092 character mark)...and
> as a side note ASP returns the entire bio. It seems to be some type of
> truncation that is happening in PHP.
>
> Is there any way I can break the Bio up over several queries to ensure I
> get the entire thing back?
>
> I'm dying here, I'm set to go live and I just noticed this problem.
>
> Please help.
>
> Ron
>
>
>
>
> >
> > Is there a limit to the amount of text a variable can hold?
> >
> > I have a situation where I'm querying a SQL database for a Salesmans
> > Biography and then echoing the variable using the syntax "$row['bio]"
> > and for some reason the bios appear to be truncated on the larger bios.
> > I am not processing the bios in any way shape or form so they should be
> complete.
> >
> > If in fact there is a limit, how could I formulate a work around for
> > this problem?
> >
> > Thanks,
> > Ron
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
Check the MySQL Manual on page 329 - it might give you some good insight
into the server tuning that might be required. If you aren't using mysql,
then it might give you a lead at least on things to check with whatever
database you *are* using.
(V)
----- Original Message -----
From: "R.S. Herhuth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 4:39 PM
Subject: Re: [PHP-WIN] Is there a limit... PLEASE HELP I'm Desperate
>
> After checking the bios it seems to be truncating right around the 4092
> character mark (including spaces). I checked the database and it does
> in fact contain the entire bio (well over the 4092 character mark)...and
> as a side note ASP returns the entire bio. It seems to be some type of
> truncation that is happening in PHP.
>
> Is there any way I can break the Bio up over several queries to ensure I
> get the entire thing back?
>
> I'm dying here, I'm set to go live and I just noticed this problem.
>
> Please help.
>
> Ron
>
>
>
>
> >
> > Is there a limit to the amount of text a variable can hold?
> >
> > I have a situation where I'm querying a SQL database for a Salesmans
> > Biography and then echoing the variable using the syntax "$row['bio]"
> > and for some reason the bios appear to be truncated on the larger bios.
> > I am not processing the bios in any way shape or form so they should be
complete.
> >
> > If in fact there is a limit, how could I formulate a work around for
> > this problem?
> >
> > Thanks,
> > Ron
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Im trying to set up virtual hosts with apache for testing php on my local
machine. I've searched the web all over and found the same instructions
consistantly and have tried them numerous times but have been unsuccessful.
First of all I'm having trouble determining where this "hosts" file is
supposed to be located so I altered it and saved it in the first directory I
found it...
C:\WINNT\system32\drivers\etc
Then made a copy of it to...
C:\WINNT\system32
I changed the line from
127.0.0.1 localhost
-to-
127.0.0.1 localhost examplesean.com
I should mention that the hosts file I'm using does not contain the .sam
extnsion that I found in tutorials the "hosts" file in fact has no file
extension.
I changed the httpd.conf file to contain:
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1>
ServerName examplesean.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot "/www/examplesean"
ErrorLog logs/error_log
CustomLog logs/access_log common
i created two directories in my apache htdocs directory one called www (as
is similar to modwest) then a folder called examplesean with an index.html
file.
When I put http://examplesean.com into the browser I get the following
error
Not Found
The requested URL / was not found on this server.
----------------------------------------------------------------------------
----
Apache/1.3.19 Server at examplesean.com Port 80
Im running PHP4 with apache on a Windows 2000 professional OS. Any help
would be greatly appreciated.
--- End Message ---