php-general Digest 14 Aug 2008 23:57:30 -0000 Issue 5624
Topics (messages 278068 through 278104):
Tool Tip in pdf
278068 by: Subhranil
278074 by: Micah Gersten
Re: On one of my computers, php can't see an external javascriptI included
278069 by: Boyd, Todd M.
278070 by: Jay Blanchard
278073 by: googling1000
Merge array i think
278071 by: admin.buskirkgraphics.com
278072 by: admin.buskirkgraphics.com
Re: php-gd problems on Ubuntu 8.04
278075 by: Micah Gersten
PHP editor for linux
278076 by: It flance
278077 by: Dan Joseph
278078 by: Micah Gersten
278079 by: Eric Butera
278081 by: Colin Guthrie
278083 by: Eric Butera
278093 by: Boyd, Todd M.
278095 by: Nathan Nobbe
278098 by: Boyd, Todd M.
278103 by: Eric Butera
Floats and avoid exponential notation - How?
278080 by: k bah
Displaying files
278082 by: Dan Shirah
278084 by: Jim Lucas
278085 by: Dan Shirah
278086 by: Stut
278087 by: Dan Shirah
278091 by: Stut
278094 by: Dan Shirah
278097 by: Stut
278099 by: Boyd, Todd M.
278100 by: Stut
278101 by: Boyd, Todd M.
Passing variable to a page in a frameset
278088 by: Jody Cleveland
278089 by: Bastien Koert
278090 by: Dan Shirah
278092 by: Stut
278096 by: Jody Cleveland
parsing form with a website question...
278102 by: bruce
278104 by: Robert Cummings
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 ---
Hi all,
I am creating a pdf where text size of cell is not fixed.
My problem is if one text is too long than that cell then it overlap the
next cell.
I wish to show the part of the text which are loneger than cell size and put
a tool tip on that cell which show the complete text.
Is it possible ? Looking for any suggestion.
Thanks,
Subhranil.
--
View this message in context:
http://www.nabble.com/Tool-Tip-in-pdf-tp18980527p18980527.html
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Why not wrap the text?
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Subhranil wrote:
> Hi all,
>
> I am creating a pdf where text size of cell is not fixed.
> My problem is if one text is too long than that cell then it overlap the
> next cell.
>
> I wish to show the part of the text which are loneger than cell size and put
> a tool tip on that cell which show the complete text.
>
> Is it possible ? Looking for any suggestion.
>
> Thanks,
> Subhranil.
>
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Carlos Medina [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 14, 2008 2:06 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] On one of my computers, php can't see an external
> javascriptI included
>
> googling1000 schrieb:
> > I have apache and php on Windows.
> > I have 3 computers. A php file is calling an external .js file.
> > Two of my computers have no problem calling a .js file, there's only
> one
> > machine that doesn't execute functions inside of the .js file.
> >
> > My .php file has the following line in the beginning of the file:
> > <script src="myfunctions.js"></script>
> >
> >
> > My .js file consists of a number of functions written in javascript
> >
> > I don't know why functions inside .js file doesn't get executed.
> >
> > I tried copy/paste all the functions inside the .js file to my .php
> file and
> > it works.
> > I don't understand how my machine can't read an external .js file
> >
> > I'm frustrated. Help will be appreciated!
> Hi,
> to check where your log are look at the Apache directory. If you are
> using a bundle or apache with installer you will find your directory
> apache/logs there where apache was installed ( The Windows way is easy
> -
> for all then doesnt know about windows );-)
Wouldn't it be entirely (well.. okay.. not ENTIRELY) up to his *browser*
as to whether or not the Javascript file is loaded? The <script> tag is
just an instruction to the client-side of things, it doesn't cause
Apache to do anything special. The browser reads the <script> tag and
loads whatever the "src" attribute points to. Also... perhaps try
<script type="text/javascript">... I doubt not specifying the script
language is breaking your page, but it wouldn't hurt to be a bit more
rigid. :)
I think it might be your URL. I'd recommend using Firefox and the
Firebug plug-in to see if your .js file is even being touched via HTTP
in the first place.
Todd Boyd
Web Programmer
--- End Message ---
--- Begin Message ---
[snip]
> googling1000 schrieb:
> > I have apache and php on Windows.
> > I have 3 computers. A php file is calling an external .js file.
> > Two of my computers have no problem calling a .js file, there's only
> one
> > machine that doesn't execute functions inside of the .js file.
> >
> > My .php file has the following line in the beginning of the file:
> > <script src="myfunctions.js"></script>
[/snip]
Check the security settings for the browser on that machine, you may
have JavaScript blocked or turned off at the browser level.
--- End Message ---
--- Begin Message ---
Edit:
I don't think Javascript is disabled on my computer.
When I tried posting the code online, I see that my js functions are
executed just fine on this one particular machine.
--
View this message in context:
http://www.nabble.com/On-one-of-my-computers%2C-php-can%27t-see-an-external-javascript-I-included-tp18975937p18985347.html
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Here is my problem in mssql in asp i can
SELECT (height + 'x' + width) as size FROM Twenty
How can i do that for mysql under php?
I am trying to create a single array result using 2 different fields of data
plus extra characters.
--- End Message ---
--- Begin Message ---
Never mind I was looking at php and it was a Mysql thing
SELECT CONCAT('My', 'S', 'QL');
will do exactly what i want
Here is my problem in mssql in asp i can
SELECT (height + 'x' + width) as size FROM Twenty
How can i do that for mysql under php?
I am trying to create a single array result using 2 different fields of data
plus extra characters.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Make sure that your php.ini file for the cli is loading gd.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Chantal Rosmuller wrote:
> Hi list,
>
> I have a PHP problem on Ubuntu 8.04, the php-gd package for ubuntu
> doesn't use the gd bundles library for security reasons if I understood
> this correctly. I solved it by downloading a php-gd fedora rpm and
> converting it to .deb with alien. it works for the apache websites but
> not for the commandline. I get the follwoing error:
>
>
> php /path/to/process.php variable1 variable2
>
> Warning: Wrong parameter count for strpos() in /path/to/config.php on
> line 30
> JpGraph Error This PHP installation is not configured with the GD
> library. Please recompile PHP with GD support to run JpGraph. (Neither
> function imagetypes() nor imagecreatefromstring() does exist)ro
>
> does anyone know how to fix this?
>
> regards Chantal
>
>
>
--- End Message ---
--- Begin Message ---
Hi,
What do you think is the best php editor for linux.
I'm using the Debian distribution.
Thanks
--- End Message ---
--- Begin Message ---
On Thu, Aug 14, 2008 at 1:05 PM, It flance <[EMAIL PROTECTED]> wrote:
> Hi,
>
> What do you think is the best php editor for linux.
>
> I'm using the Debian distribution.
>
> Thanks
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
You should search the archives, there are dozens of discussions on this one.
I think you'll find a lot of people recommend the Zend IDE, I personally use
PhpED, both are good. Kate is pretty good if you don't want to buy anything
(apt-get install kate -- if its not there...)
--
-Dan Joseph
www.canishosting.com - Plans start @ $1.99/month.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
--- End Message ---
--- Begin Message ---
I use Eclipse with PHPEclipse. I think you have to install from source
to get PHPEclipse to work right.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
It flance wrote:
> Hi,
>
> What do you think is the best php editor for linux.
>
> I'm using the Debian distribution.
>
> Thanks
>
>
>
>
>
>
--- End Message ---
--- Begin Message ---
On Thu, Aug 14, 2008 at 1:05 PM, It flance <[EMAIL PROTECTED]> wrote:
> Hi,
>
> What do you think is the best php editor for linux.
>
> I'm using the Debian distribution.
>
> Thanks
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Eclipse with PDT.
http://www.zend.com/en/community/pdt#all
--- End Message ---
--- Begin Message ---
Eric Butera wrote:
Eclipse with PDT.
http://www.zend.com/en/community/pdt#all
As much as I hate +1 emails, this is a good options... Good subversion
integration too if that floats your boat.
Col
--- End Message ---
--- Begin Message ---
On Thu, Aug 14, 2008 at 1:36 PM, Colin Guthrie <[EMAIL PROTECTED]> wrote:
> As much as I hate +1 emails, this is a good options... Good subversion
> integration too if that floats your boat.
>
> Col
>
+1 for subclipse! ;D
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Micah Gersten [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 14, 2008 12:20 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP editor for linux
>
> I use Eclipse with PHPEclipse. I think you have to install from
source
> to get PHPEclipse to work right.
---8<--- snip
> It flance wrote:
> > Hi,
> >
> > What do you think is the best php editor for linux.
> >
> > I'm using the Debian distribution.
Yep, PHPEclipse will be all sorts of fudged if you add it in
after-the-fact. I learned that the hard way. :(
Todd Boyd
Web Programmer
--- End Message ---
--- Begin Message ---
On Thu, Aug 14, 2008 at 2:54 PM, Boyd, Todd M. <[EMAIL PROTECTED]> wrote:
> > -----Original Message-----
> > From: Micah Gersten [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 14, 2008 12:20 PM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] PHP editor for linux
> >
> > I use Eclipse with PHPEclipse. I think you have to install from
> source
> > to get PHPEclipse to work right.
>
> ---8<--- snip
>
> > It flance wrote:
> > > Hi,
> > >
> > > What do you think is the best php editor for linux.
> > >
> > > I'm using the Debian distribution.
>
> Yep, PHPEclipse will be all sorts of fudged if you add it in
> after-the-fact. I learned that the hard way. :(
i used to use php-eclipse + subclipse all the time; i never had to 'install
from source' or had issues installing subclipse on top of php-eclipse...
just my 2c,
vim + cli + protoeditor(as needed)
-nathan
--- End Message ---
--- Begin Message ---
From: Nathan Nobbe [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2008 4:00 PM
To: Boyd, Todd M.
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP editor for linux
On Thu, Aug 14, 2008 at 2:54 PM, Boyd, Todd M. <[EMAIL PROTECTED]> wrote:
> -----Original Message-----
> From: Micah Gersten [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 14, 2008 12:20 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP editor for linux
>
> I use Eclipse with PHPEclipse. I think you have to install from
source
> to get PHPEclipse to work right.
---8<--- snip
> It flance wrote:
> > Hi,
> >
> > What do you think is the best php editor for linux.
> >
> > I'm using the Debian distribution.
> Yep, PHPEclipse will be all sorts of fudged if you add it in
> after-the-fact. I learned that the hard way. :(
i used to use php-eclipse + subclipse all the time; i never had to 'install
from source' or had issues installing subclipse on top of php-eclipse...
just my 2c,
vim + cli + protoeditor(as needed)
---
Ahh... but you're in Linux. I was referring to the Windows distribution of
Eclipse. It's Java, so I guess it wouldn't matter... but when I installed
PHPEclipse on top of Eclipse, it broke. Big-time.
Todd Boyd
Web Programmer
--- End Message ---
--- Begin Message ---
On Thu, Aug 14, 2008 at 4:59 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> i used to use php-eclipse + subclipse all the time; i never had to 'install
> from source' or had issues installing subclipse on top of php-eclipse...
>
> just my 2c,
>
> vim + cli + protoeditor(as needed)
>
> -nathan
>
What sort of plugins do you use with vim? For a while I was
interested with it after seeing some presentations on it. I never
could figure out how to get it to do code completion based on methods
of a class, it sort of jumbled all of them from a project together. I
also felt like it was a bit clunky jumping between files. Using MVC
means at least 3 files per uri so that got to be very tedious for me
jumping between so many different files. Any tips there?
One of my favorite parts of pdt is the fact that I can code complete
any class in my current project or anything that I specify in my
include path. Also you can jump to the exact class/method by control
clicking on it too which is a huge time saver. Is there anything like
this?
--- End Message ---
--- Begin Message ---
Hi,
I'm working with floats because I have a big number to identify users, and the
only operation I make with this number is to add something less than
10000000000 with 10000000000 (one and ten zeros). Besides that I just need to
use the number to search ("=" comparison). I never need the fractional part of
the number. As I said, I only use float and not int because of the size of the
number.
I noticed PHP uses the number in exponential notation sometimes, this happened
with both: 4100000 + 10000000000 and 4153154 + 10000000000. I'm using
ctype_digit() to check when this happens. Is there a way to avoid that so that
PHP always uses the decimal notation?
(The focus on my code is not to generate the new user id, I just need to
generate it to do other things. Almost all my functions need to generate the
new user id, as we cannot map the old user ids to the new user ids. I'm putting
two systems together, at least for now, I need to use the old user id from 1
external source and generate the new user id to operate user records on another
external db.)
----- code -- (receives "old" user id, and changes to the new format)
$_SESSION['some_array']['old_user_id'] = $userinfo[0]; // I got the number from
DB. Say. 4153154..
$checking_old_user_id = (string)$_SESSION['some_array']['old_user_id'];
// So I can use ctype_digit()
$_SESSION['some_array']['new_user_id'] = (float)10000000000 +
$userinfo[0];
$checking_new_user_id = (string)$_SESSION['some_array']['new_user_id'];
$_SESSION['some_array']['foo'] = $userinfo[1]; // Other data
if( ctype_digit($checking_old_user_id) == false ) { // Exponential
notation detected
echo 'some message';
return false; // Script stops!
}
if( ctype_digit($checking_new_user_id) == false ) { // Exponential
notation detected
echo 'some message';
return false;
}
if($_SESSION['some_array']['old_user_id'] < 0) { // Filter input
echo 'some message';
return false;
}
if($_SESSION['some_array']['new_user_id'] < 0) { // Filter input
echo 'some message';
return false;
}
----- code
Any ideas, suggestions? I would like to make php stop using the exponential
notation so I don't need to bother with these checkings.
thanks.
=
--
Powered by Outblaze
--- End Message ---
--- Begin Message ---
I think this should be a simple question and answer, but after looking
through the manual and goggling I have yet to find an answer.
Question: Using PHP, how would I go about opening a file in a window, table
or div?
Example: I have a file called 123.xls. When a condition is met, I want PHP
to open this file into the current window.
I know I can use Javascript to easily do this, but due to the requirements
of my application, javascript is not an option here.
I tried using fopen() but that only opens the file in the background for PHP
to read/write to and will not display the file in a browser.
Any ideas?
Thx,
Dan
--- End Message ---
--- Begin Message ---
Dan Shirah wrote:
I think this should be a simple question and answer, but after looking
through the manual and goggling I have yet to find an answer.
Question: Using PHP, how would I go about opening a file in a window, table
or div?
Example: I have a file called 123.xls. When a condition is met, I want PHP
to open this file into the current window.
I know I can use Javascript to easily do this, but due to the requirements
of my application, javascript is not an option here.
I tried using fopen() but that only opens the file in the background for PHP
to read/write to and will not display the file in a browser.
Any ideas?
Thx,
Dan
Who needs PHP... :)
The following will open a new browser window and load the href in it.
<a href="http://examples.com/123.xls" target="_blank">Open It!!!</a>
If that isn't what you are looking for, please give a little more details.
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--- End Message ---
--- Begin Message ---
>
> Who needs PHP... :)
>>
>> The following will open a new browser window and load the href in it.
>>
>> <a href="http://examples.com/123.xls" target="_blank">Open It!!!</a>
>>
>> If that isn't what you are looking for, please give a little more details.
>
>
You're killin' me, Jim! :)
I need to open the file from the server, using PHP. I already know how to
open it using HTML and Javascript, but those methods cannot be used for this
section of my application.
I need to call and open the document in the browser window using PHP.
Example: If I was going to do it with Javascript I would just use something
simple like this;
function open() {
window.open('open.php');
}
Or, if I was going to use HTML I would use something simlar to what you
posted.
How can I achieve that same functionality using only PHP? Or is it not
possible?
--- End Message ---
--- Begin Message ---
On 14 Aug 2008, at 21:06, Dan Shirah wrote:
Who needs PHP... :)
The following will open a new browser window and load the href in
it.
<a href="http://examples.com/123.xls" target="_blank">Open It!!!</a>
If that isn't what you are looking for, please give a little more
details.
You're killin' me, Jim! :)
I need to open the file from the server, using PHP. I already know
how to
open it using HTML and Javascript, but those methods cannot be used
for this
section of my application.
I need to call and open the document in the browser window using PHP.
Example: If I was going to do it with Javascript I would just use
something
simple like this;
function open() {
window.open('open.php');
}
Or, if I was going to use HTML I would use something simlar to what
you
posted.
How can I achieve that same functionality using only PHP? Or is it
not
possible?
You need to know the mime type for the file you're serving. Call
header('Content-Type: x/y'); where x/y is the mime type. Then call
readfile('/path/to/file/on/server'); to output the file to the browser.
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
>
> You need to know the mime type for the file you're serving. Call
>> header('Content-Type: x/y'); where x/y is the mime type. Then call
>> readfile('/path/to/file/on/server'); to output the file to the browser.
>>
>> -Stut
>
>
Stut, trying that method gives me the following: PHP Warning: readfile(
\\server\folder\file.xls) [<a
href='function.readfile'>function.readfile</a>]: failed to open stream:
Invalid argument on line 44
Here's my code. Line 44 is where it stated readfile()
This document is located on a seperate server.
<?php
$folder = $_GET['folder'];
$file = $_GET['file'];
$filename = "\\\\server\\".$folder."\\".$file.".xls";
header("Content-Type: application/x-msdownload");
readfile($filename);
?>
--- End Message ---
--- Begin Message ---
On 14 Aug 2008, at 21:29, Dan Shirah wrote:
You need to know the mime type for the file you're serving. Call
header('Content-Type: x/y'); where x/y is the mime type. Then call
readfile('/path/to/file/on/server'); to output the file to the
browser.
-Stut
Stut, trying that method gives me the following: PHP Warning:
readfile(\\server\folder\file.xls) [<a
href='function.readfile'>function.readfile</a>]: failed to open
stream: Invalid argument on line 44
Here's my code. Line 44 is where it stated readfile()
This document is located on a seperate server.
<?php
$folder = $_GET['folder'];
$file = $_GET['file'];
$filename = "\\\\server\\".$folder."\\".$file.".xls";
header("Content-Type: application/x-msdownload");
readfile($filename);
?>
That simply means it can't open the file. Make sure the machine this
is running on has everything it needs to access that UNC filename.
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
That simply means it can't open the file. Make sure the machine this is
running on has everything it needs to access that UNC filename.
-Stut
Stut,
If I copy the link from the error message and paste it into a browser
running from my PHP server, the file comes up just fine.
Should I try mkdir() or mkpath() to set the server and folder location and
then try it from there?
--- End Message ---
--- Begin Message ---
On 14 Aug 2008, at 21:57, Dan Shirah wrote:
That simply means it can't open the file. Make sure the machine this
is running on has everything it needs to access that UNC filename.
-Stut
Stut,
If I copy the link from the error message and paste it into a
browser running from my PHP server, the file comes up just fine.
Should I try mkdir() or mkpath() to set the server and folder
location and then try it from there?
The user PHP runs as needs to be able to access it, not you. I'm
guessing you're on Windows...
If you're using IIS then it's the IUSR_machine user which doesn't have
access to the network by default. You can enable it but I can't recall
how off the top of my head and you may want to reconsider because it
leaves the server a lot more open should IIS/PHP/else be compromised.
If you're using Apache on Windows then you'll need to check the
service configuration to see what user it's running as.
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Stut [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 14, 2008 4:21 PM
> To: Dan Shirah
> Cc: PHP-General List
> Subject: Re: [PHP] Displaying files
>
> On 14 Aug 2008, at 21:57, Dan Shirah wrote:
> > That simply means it can't open the file. Make sure the machine this
> > is running on has everything it needs to access that UNC filename.
> >
> > -Stut
> >
> >
> > Stut,
> >
> > If I copy the link from the error message and paste it into a
> > browser running from my PHP server, the file comes up just fine.
> >
> > Should I try mkdir() or mkpath() to set the server and folder
> > location and then try it from there?
>
> The user PHP runs as needs to be able to access it, not you. I'm
> guessing you're on Windows...
>
> If you're using IIS then it's the IUSR_machine user which doesn't have
> access to the network by default. You can enable it but I can't recall
> how off the top of my head and you may want to reconsider because it
> leaves the server a lot more open should IIS/PHP/else be compromised.
>
> If you're using Apache on Windows then you'll need to check the
> service configuration to see what user it's running as.
It can be done somewhat securely by mapping a network drive and then
granting permissions to it specifically, rather than the network itself.
(I believe...)
Todd Boyd
Web Programmer
--- End Message ---
--- Begin Message ---
On 14 Aug 2008, at 22:24, Boyd, Todd M. wrote:
-----Original Message-----
From: Stut [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2008 4:21 PM
To: Dan Shirah
Cc: PHP-General List
Subject: Re: [PHP] Displaying files
On 14 Aug 2008, at 21:57, Dan Shirah wrote:
That simply means it can't open the file. Make sure the machine this
is running on has everything it needs to access that UNC filename.
-Stut
Stut,
If I copy the link from the error message and paste it into a
browser running from my PHP server, the file comes up just fine.
Should I try mkdir() or mkpath() to set the server and folder
location and then try it from there?
The user PHP runs as needs to be able to access it, not you. I'm
guessing you're on Windows...
If you're using IIS then it's the IUSR_machine user which doesn't
have
access to the network by default. You can enable it but I can't
recall
how off the top of my head and you may want to reconsider because it
leaves the server a lot more open should IIS/PHP/else be compromised.
If you're using Apache on Windows then you'll need to check the
service configuration to see what user it's running as.
It can be done somewhat securely by mapping a network drive and then
granting permissions to it specifically, rather than the network
itself.
(I believe...)
It's been a while since I've used Windows but IIRC you need to enable
network access for that user at the lowest layer (i.e. system policy)
and then normal access rules apply, but I could be wrong. Either way
I'd avoid doing it if at all possible.
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Stut [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 14, 2008 4:34 PM
> To: Boyd, Todd M.
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Displaying files
>
> On 14 Aug 2008, at 22:24, Boyd, Todd M. wrote:
>
> >> -----Original Message-----
> >> From: Stut [mailto:[EMAIL PROTECTED]
> >> Sent: Thursday, August 14, 2008 4:21 PM
> >> To: Dan Shirah
> >> Cc: PHP-General List
> >> Subject: Re: [PHP] Displaying files
> >>
> >> On 14 Aug 2008, at 21:57, Dan Shirah wrote:
> >>> That simply means it can't open the file. Make sure the machine
> this
> >>> is running on has everything it needs to access that UNC filename.
> >>>
> >>> -Stut
> >>>
> >>>
> >>> Stut,
> >>>
> >>> If I copy the link from the error message and paste it into a
> >>> browser running from my PHP server, the file comes up just fine.
> >>>
> >>> Should I try mkdir() or mkpath() to set the server and folder
> >>> location and then try it from there?
> >>
> >> The user PHP runs as needs to be able to access it, not you. I'm
> >> guessing you're on Windows...
> >>
> >> If you're using IIS then it's the IUSR_machine user which doesn't
> >> have
> >> access to the network by default. You can enable it but I can't
> >> recall
> >> how off the top of my head and you may want to reconsider because
it
> >> leaves the server a lot more open should IIS/PHP/else be
> compromised.
> >>
> >> If you're using Apache on Windows then you'll need to check the
> >> service configuration to see what user it's running as.
> >
> > It can be done somewhat securely by mapping a network drive and then
> > granting permissions to it specifically, rather than the network
> > itself.
> > (I believe...)
>
> It's been a while since I've used Windows but IIRC you need to enable
> network access for that user at the lowest layer (i.e. system policy)
> and then normal access rules apply, but I could be wrong. Either way
> I'd avoid doing it if at all possible.
I think after XP SP2 it got a bit more granular. However, I'm no MCSE,
so don't take my word for it. :) I do agree with you, anyway, that the
user a webserver is posing as should not have access to network
resources like this.
I digress.
Todd Boyd
Web Programmer
--- End Message ---
--- Begin Message ---
Hello,
I've got a website here: http://beta.menashalibrary.org/about
On every page, i've got a search box at the top. This search box
searches the library's web catalog. The problem is, when someone
searches, it takes them away from the site. What I'd like to do is
take what a person searches for, and load it into the bottom frame of
this page:
http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
Is there a way, with php, to take what someone puts in the search box
and put the results into the bottom frame of a frameset when the
originating page does not contain frames?
- jody
--- End Message ---
--- Begin Message ---
On Thu, Aug 14, 2008 at 4:34 PM, Jody Cleveland <[EMAIL PROTECTED]>wrote:
> Hello,
>
> I've got a website here: http://beta.menashalibrary.org/about
>
> On every page, i've got a search box at the top. This search box searches
> the library's web catalog. The problem is, when someone searches, it takes
> them away from the site. What I'd like to do is take what a person searches
> for, and load it into the bottom frame of this page:
>
> http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
>
> Is there a way, with php, to take what someone puts in the search box and
> put the results into the bottom frame of a frameset when the originating
> page does not contain frames?
>
> - jody
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
This is more a javascript / html
--
Bastien
Cat, the other other white meat
--- End Message ---
--- Begin Message ---
>
> > Hello,
> >
> > I've got a website here: http://beta.menashalibrary.org/about
> >
> > On every page, i've got a search box at the top. This search box searches
> > the library's web catalog. The problem is, when someone searches, it
> takes
> > them away from the site. What I'd like to do is take what a person
> searches
> > for, and load it into the bottom frame of this page:
> >
> >
> http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
> >
> > Is there a way, with php, to take what someone puts in the search box and
> > put the results into the bottom frame of a frameset when the originating
> > page does not contain frames?
> >
> > - jody
Bastien is right, this is more of a Javascript issue.
It can be accomplished very easily by doing the following.
Once the user enters the search criteria have the submit button/link call a
javascript function like the following:
function submitForm(var1,var2) {
top.leftFrame.document.my_search.text1.value = var1;
top.leftFrame.document.my_search.text2.value = var2;
top.leftFrame.document.my_search.submit();
document.search_form.submit();
}
And this would be your submit link:
<a
href="javascript:submitForm(document.search_form.var1.value,document.search_form.var2.value)">SEARCH</a>
--- End Message ---
--- Begin Message ---
On 14 Aug 2008, at 21:34, Jody Cleveland wrote:
I've got a website here: http://beta.menashalibrary.org/about
On every page, i've got a search box at the top. This search box
searches the library's web catalog. The problem is, when someone
searches, it takes them away from the site. What I'd like to do is
take what a person searches for, and load it into the bottom frame
of this page:
http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
Is there a way, with php, to take what someone puts in the search
box and put the results into the bottom frame of a frameset when the
originating page does not contain frames?
Set the target attribute of the search form to the name of the bottom
frame. The form will then be POSTed in that frame.
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
On Thu, Aug 14, 2008 at 3:43 PM, Dan Shirah <[EMAIL PROTECTED]> wrote:
>> > Hello,
>> >
>> > I've got a website here: http://beta.menashalibrary.org/about
>> >
>> > On every page, i've got a search box at the top. This search box
>> > searches
>> > the library's web catalog. The problem is, when someone searches, it
>> > takes
>> > them away from the site. What I'd like to do is take what a person
>> > searches
>> > for, and load it into the bottom frame of this page:
>> >
>> >
>> > http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
>> >
>> > Is there a way, with php, to take what someone puts in the search box
>> > and
>> > put the results into the bottom frame of a frameset when the originating
>> > page does not contain frames?
>> >
>> > - jody
>
> Bastien is right, this is more of a Javascript issue.
>
> It can be accomplished very easily by doing the following.
>
> Once the user enters the search criteria have the submit button/link call a
> javascript function like the following:
>
> function submitForm(var1,var2) {
> top.leftFrame.document.my_search.text1.value = var1;
> top.leftFrame.document.my_search.text2.value = var2;
> top.leftFrame.document.my_search.submit();
> document.search_form.submit();
> }
>
> And this would be your submit link:
>
> <a
> href="javascript:submitForm(document.search_form.var1.value,document.search_form.var2.value)">SEARCH</a>
I apologize for my ignorance, I don't really know much about
javascript. When I add all that into my form page, when I submit the
form, it just replaces the page I was on with the form results, rather
than in the new frame page. I'm assuming I need to put the url for the
frameset page in that code somewhere. Where does it go? And, which
part do I replace with the frame name on that frameset page?
Thank you for taking the time to help me with this, I really appreciate it!
- jody
--- End Message ---
--- Begin Message ---
Hi guys...
Got a question that I figured I'd ask before I reinvent the wheel.
A basic website has a form, or multiple forms. within the form, there might
be multiple elements (lists/select statements, etc...). each item would have
a varname, which would in turn be used as part of the form action, to create
the entire query...
sort of like:
form action=test.php?
option
name=foo
foo=1
foo=2
foo=3
foo=4
/option
option
name=cat
cat=1
cat=2
cat=3
/option
/form
so you'd get the following urls in this psuedo example:
test.php?foo=1&cat=1
test.php?foo=1&cat=2
test.php?foo=1&cat=3
test.php?foo=2&cat=1
test.php?foo=2&cat=2
test.php?foo=2&cat=3
test.php?foo=3&cat=1
test.php?foo=3&cat=2
test.php?foo=3&cat=3
test.php?foo=4&cat=1
test.php?foo=4&cat=2
test.php?foo=4&cat=3
i'm looking for an app that has the ability to parse any given "form" on a
web page, returning the complete list of possible url combinations based on
the underlying elements that make up/define the form...
anybody ever seen anything remotely close to this...???
i've been research crawlers, thinking that this kind of functionality would
already exist, but so far, no luck!
thanks
--- End Message ---
--- Begin Message ---
On Thu, 2008-08-14 at 15:47 -0700, bruce wrote:
> Hi guys...
>
> Got a question that I figured I'd ask before I reinvent the wheel.
>
> A basic website has a form, or multiple forms. within the form, there might
> be multiple elements (lists/select statements, etc...). each item would have
> a varname, which would in turn be used as part of the form action, to create
> the entire query...
>
> sort of like:
> form action=test.php?
> option
> name=foo
> foo=1
> foo=2
> foo=3
> foo=4
> /option
>
> option
> name=cat
> cat=1
> cat=2
> cat=3
> /option
> /form
>
> so you'd get the following urls in this psuedo example:
> test.php?foo=1&cat=1
> test.php?foo=1&cat=2
> test.php?foo=1&cat=3
> test.php?foo=2&cat=1
> test.php?foo=2&cat=2
> test.php?foo=2&cat=3
> test.php?foo=3&cat=1
> test.php?foo=3&cat=2
> test.php?foo=3&cat=3
> test.php?foo=4&cat=1
> test.php?foo=4&cat=2
> test.php?foo=4&cat=3
>
> i'm looking for an app that has the ability to parse any given "form" on a
> web page, returning the complete list of possible url combinations based on
> the underlying elements that make up/define the form...
>
> anybody ever seen anything remotely close to this...???
>
> i've been research crawlers, thinking that this kind of functionality would
> already exist, but so far, no luck!
A little algorithm analysis would learn you that to do so would require
storage space on an exponential scale... as such you won't find it.
Also, what would you put into text/textarea fields? I've heard Google
has begun experiments to index the "deep" web, but they just take
somewhat educated guesses at filling in forms, not at expanding the
exponential result set. For a simple analysis of the problem. Take 2
select fields with 2 options each... you have 4 possible outcomes (2 *
2). Now take 3 selects lists with 3 items, 4 items, and 5 items. You now
have 60 possible outcomes. From this it is easy to see the relation ship
is a * b * c * ... * x. So take a form with 10 select fields each with
10 items. That evaluates to 10^10 = 10000000000. In other words, with a
mere 10 drop down selects each with 10 items, the solution space
consists of 10 billion permutations. Now lets say each item costs
exactly 1 byte to store the answer, and so you need 10 bytes to store
one particular solution set. That's 100 billion bytes AKA 100 metric
gigabytes... remember that was just 1 form.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---