php-general Digest 21 Jan 2009 09:08:48 -0000 Issue 5914

Topics (messages 286889 through 286906):

Re: Client/Server Printing
        286889 by: Frank Stanovcak
        286901 by: Tony Marston

Re: Installation problems on Vista
        286890 by: lucson pierre-charles
        286891 by: Nathan Rixham
        286892 by: lucson pierre-charles
        286894 by: lucson pierre-charles
        286895 by: Shawn McKenzie
        286896 by: Nathan Rixham
        286897 by: Shawn McKenzie
        286898 by: lucson pierre-charles
        286899 by: Shawn McKenzie

Curl fiel Upload
        286893 by: Matthias Laug
        286900 by: Manuel Lemos

Please explain: index.php/index/index
        286902 by: leledumbo
        286903 by: Carlos Medina
        286904 by: leledumbo
        286905 by: Török Alpár
        286906 by: leledumbo

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 ---
"Paul M Foster" <[email protected]> wrote in message
news:[email protected]...
> I'd like a side check on what I'm doing to print on our internal
> network.
>
> We have an internal server/site which uses PHP code I've written to
> "run" the business-- invoicing, A/P, inventory, etc. Some things, like
> invoices and reports, need to be printed. Now remember, the code is on
> the server, and we access it from our client machines on our desks. When
> we print, we do so to our local printers, attached to the client
> machines.
>
> So the best way I could think of to making printing work was to generate
> PDFs of whatever needs to be printed, dump the PDF on the server, and
> provide a link to the PDF on the web page. The user clicks on the
> generated PDF, and his/her browser opens up Acrobat or xpdf, and prints
> from that application to their local machine.
>
> Is that a reasonable way to implement this? Any better ideas?
>
> Paul
>
> -- 
> Paul M. Foster

I'm using fpdf to generate a pdf that is
displayed in a seperate window for review prior to printing...sort of like a
print preveiw.  If you can set the webserver to process .pdf files through
php it will display in the adobe reader plug in and all the client has to do
is hit print.

www. fpdf .com

Frank








--- End Message ---
--- Begin Message ---
"Paul M Foster" <[email protected]> wrote in message 
news:[email protected]...
> I'd like a side check on what I'm doing to print on our internal
> network.
>
> We have an internal server/site which uses PHP code I've written to
> "run" the business-- invoicing, A/P, inventory, etc. Some things, like
> invoices and reports, need to be printed. Now remember, the code is on
> the server, and we access it from our client machines on our desks. When
> we print, we do so to our local printers, attached to the client
> machines.
>
> So the best way I could think of to making printing work was to generate
> PDFs of whatever needs to be printed, dump the PDF on the server, and
> provide a link to the PDF on the web page. The user clicks on the
> generated PDF, and his/her browser opens up Acrobat or xpdf, and prints
> from that application to their local machine.
>
> Is that a reasonable way to implement this? Any better ideas?

I have built an application similar to yours, and I have solved the printing 
problem by using software from the following two companies: 
http://www.nicelabel.com and http://www.namtuk.com/autoprintemail.aspx

Basically the user runs a web page which generates the required report, in 
either XML or PDF format (I believe others are available) and sends an email 
which identifies a particular client printer. At the client end, with any 
number of PCs and printers, there is a piece of software running which looks 
for these emails, and when one is received it sends the print to the 
designated printer. Each report can be tailored to output to any printer, 
including a specific printer for each user. This means that the user does 
not see the generated report in his web browser and then have to press the 
PRINT key and choose the printer before it gets printed. He simply presses a 
"Generate Report" button, and within a few seconds it is sent to the 
printer.

It's not free, but it's worth the money (IMHO).

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

> Paul
>
> -- 
> Paul M. Foster 



--- End Message ---
--- Begin Message ---
Dear Nathan,
                 The "short_tags" is sure off but when I changed the scripts, 
they're still being output to the browser. 
 
These are the lines I added to the modules section:
#LoadModule php5_module c:/php5/php5apache2.dll#AddType application/x-httpd-php 
.php#PHPIniDir "c:/php5"
 
I added these lines to the DirectoryIndex:
DirectoryIndex index.html index.html.var index.php
 
Lucson> Date: Mon, 19 Jan 2009 22:49:01 +0000> From: [email protected]> To: 
[email protected]> CC: [email protected]> Subject: Re: 
Installation problems on Vista> > lucson pierre-charles wrote:> > I am having 
problems installing the zip package (PHP5) on Windows Vista. The output will 
not come on the browser upon testing. Only the code is being output to the 
browser. Apache (Apache 2) was properly installed. Your assistance please. 
Regards, Lucson> > check the php.ini setting for "short_tags" - quite sure it 
will be off > and that you are using short tags in your php scripts "<?" rather 
than > "<?php" - either change the ini setting to off or change you're scripts 
> to use "<?php" instead.> > should fix it :)

--- End Message ---
--- Begin Message ---
lucson pierre-charles wrote:
Dear Nathan,
The "short_tags" is sure off but when I changed the scripts, they're still being output to the browser. These are the lines I added to the modules section:
#LoadModule php5_module c:/php5/php5apache2.dll
#AddType application/x-httpd-php .php
#PHPIniDir "c:/php5"
remove the #'s


--- End Message ---
--- Begin Message ---
TG,
                 I configured it as follows but will still not work. 
 
These are the lines I added to the modules section:
#LoadModule php5_module c:/php5/php5apache2.dll#AddType application/x-httpd-php 
.php#PHPIniDir "c:/php5"
 
I added these lines to the DirectoryIndex:
DirectoryIndex index.html index.html.var index.php
 
Lucson> From: [email protected]> To: [email protected]; 
[email protected]> Date: Mon, 19 Jan 2009 18:35:08 -0500> Subject: Re: 
[PHP] Installation problems on Vista> > You most likely need to configure 
Apache to process PHP script files. Check > out this page:> > 
http://www.ampsoft.net/webdesign-l/how-to-install-apache-php-mysql-3.html> > 
-TG> > ----- Original Message -----> From: lucson pierre-charles 
<[email protected]>> To: <[email protected]>> Date: Mon, 19 Jan 
2009 22:37:25 +0000> Subject: [PHP] Installation problems on Vista> > > > > I 
am having problems installing the zip package (PHP5) on Windows Vista. > The 
output will not come on the browser upon testing. Only the code is > being 
output to the browser. Apache (Apache 2) was properly installed. Your > 
assistance please. Regards, Lucson> > > > -- > PHP General Mailing List 
(http://www.php.net/)> To unsubscribe, visit: http://www.php.net/unsub.php> 

--- End Message ---
--- Begin Message ---
Nathan,
 
              When I remove the #'s, I can't have Apache to restart. I keep 
receiving error messages.
 
Lucson> Date: Tue, 20 Jan 2009 22:41:44 +0000> From: [email protected]> To: 
[email protected]> CC: [email protected]> Subject: [PHP] Re: 
Installation problems on Vista> > lucson pierre-charles wrote:> > Dear Nathan,> 
> The "short_tags" is sure off but when I changed the > > scripts, they're 
still being output to the browser. > > > > These are the lines I added to the 
modules section:> > #LoadModule php5_module c:/php5/php5apache2.dll> > #AddType 
application/x-httpd-php .php> > #PHPIniDir "c:/php5"> > > >> remove the #'s> > 
> -- > PHP General Mailing List (http://www.php.net/)> To unsubscribe, visit: 
http://www.php.net/unsub.php> 

--- End Message ---
--- Begin Message ---
Nathan Rixham wrote:
> lucson pierre-charles wrote:
>> Dear Nathan,
>>                  The "short_tags" is sure off but when I changed the
>> scripts, they're still being output to the browser.  
>> These are the lines I added to the modules section:
>> #LoadModule php5_module c:/php5/php5apache2.dll
>> #AddType application/x-httpd-php .php
>> #PHPIniDir "c:/php5"
>>  
>>
> remove the #'s
> 
 Yes,

and then...
make sure php and your php.ini are actually in c:\php5,

and then...
make sure to restart apache.

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
lucson pierre-charles wrote:
Nathan,
When I remove the #'s, I can't have Apache to restart. I keep receiving error messages.

what are the errors?

--- End Message ---
--- Begin Message ---
lucson pierre-charles wrote:
> Nathan,
>  
>               When I remove the #'s, I can't have Apache to restart. I keep 
> receiving error messages.
>  
> Lucson> Date: Tue, 20 Jan 2009 22:41:44 +0000> From: [email protected]> To: 
> [email protected]> CC: [email protected]> Subject: [PHP] Re: 
> Installation problems on Vista> > lucson pierre-charles wrote:> > Dear 
> Nathan,> > The "short_tags" is sure off but when I changed the > > scripts, 
> they're still being output to the browser. > > > > These are the lines I 
> added to the modules section:> > #LoadModule php5_module 
> c:/php5/php5apache2.dll> > #AddType application/x-httpd-php .php> > 
> #PHPIniDir "c:/php5"> > > >> remove the #'s> > > -- > PHP General Mailing 
> List (http://www.php.net/)> To unsubscribe, visit: 
> http://www.php.net/unsub.php> 

What is the error message from the windows event viewer?  Most likely it
can't find a file.

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Yes. It can't find a file.> To: [email protected]> Date: Tue, 20 Jan 
2009 17:14:14 -0600> From: [email protected]> Subject: Re: [PHP] Re: 
Installation problems on Vista> > lucson pierre-charles wrote:> > Nathan,> > > 
> When I remove the #'s, I can't have Apache to restart. I keep receiving error 
messages.> > > > Lucson> Date: Tue, 20 Jan 2009 22:41:44 +0000> From: 
[email protected]> To: [email protected]> CC: [email protected]> 
Subject: [PHP] Re: Installation problems on Vista> > lucson pierre-charles 
wrote:> > Dear Nathan,> > The "short_tags" is sure off but when I changed the > 
> scripts, they're still being output to the browser. > > > > These are the 
lines I added to the modules section:> > #LoadModule php5_module 
c:/php5/php5apache2.dll> > #AddType application/x-httpd-php .php> > #PHPIniDir 
"c:/php5"> > > >> remove the #'s> > > -- > PHP General Mailing List 
(http://www.php.net/)> To unsubscribe, visit: http://www.php.net/unsub.php> > > 
What is the error message from the windows event viewer? Most likely it> can't 
find a file.> > -- > Thanks!> -Shawn> http://www.spidean.com> > -- > PHP 
General Mailing List (http://www.php.net/)> To unsubscribe, visit: 
http://www.php.net/unsub.php> 

--- End Message ---
--- Begin Message ---
lucson pierre-charles wrote:
> Yes. It can't find a file.> To: [email protected]> Date: Tue, 20 Jan 
> 2009 17:14:14 -0600> From: [email protected]> Subject: Re: [PHP] Re: 
> Installation problems on Vista> > lucson pierre-charles wrote:> > Nathan,> > 
> > > When I remove the #'s, I can't have Apache to restart. I keep receiving 
> error messages.> > > > Lucson> Date: Tue, 20 Jan 2009 22:41:44 +0000> From: 
> [email protected]> To: [email protected]> CC: 
> [email protected]> Subject: [PHP] Re: Installation problems on Vista> 
> > lucson pierre-charles wrote:> > Dear Nathan,> > The "short_tags" is sure 
> off but when I changed the > > scripts, they're still being output to the 
> browser. > > > > These are the lines I added to the modules section:> > 
> #LoadModule php5_module c:/php5/php5apache2.dll> > #AddType 
> application/x-httpd-php .php> > #PHPIniDir "c:/php5"> > > >> remove the #'s> 
> > > -- > PHP General Mailing List (http://www.php.net/)> To unsubscribe, 
> visit: http://www.php.net/unsub.php> > > What is
 the error message from the windows event viewer? Most likely it> can't find a 
file.> > -- > Thanks!> -Shawn> http://www.spidean.com> > -- > PHP General 
Mailing List (http://www.php.net/)> To unsubscribe, visit: 
http://www.php.net/unsub.php> 

Three probabilities:

1. It can't find a file that Apache need to load PHP
2. It can't find a file that PHP needs (an extension)
3. It can't find a library that an extension needs

Solutions:

1. Add c:\php5 to your path environment variable
2. Make sure you have the correct extensions dir set in php.ini
(probably c:\php5\ext)
3. Number 1 probably fixes this or copy all .dll from c:\php5 to
c:\windows (this hasn't been needed in a while) try commenting out (add
a ; to the beginning of) each extension in php.ini

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Hello everybody,

I've got a problem using curl to upload a file. I want to send it to a form
written with the Django Framework.

Post Request are processed correctly, with one anomaly.
This piece of code works fine

    curl_setopt($process, CURLOPT_POSTFIELDS, http_build_query($data));

But if i provide only an array no data is send to the form

    curl_setopt($process, CURLOPT_POSTFIELDS, $data);

I have read somewhere that curl sends formdata with enctype="form/mulitpart"
only if I provide an array not a string.

If I add "@filename" to the $data variable (string or array) it does not
send the file to the form.

Each example I have found in the internet so far did not work.

Any support or idea?

Thanks for anything!!!!

Mattes

--- End Message ---
--- Begin Message ---
Hello,

on 01/20/2009 09:10 PM Matthias Laug said the following:
> I've got a problem using curl to upload a file. I want to send it to a form
> written with the Django Framework.
> 
> Post Request are processed correctly, with one anomaly.
> This piece of code works fine
> 
>     curl_setopt($process, CURLOPT_POSTFIELDS, http_build_query($data));
> 
> But if i provide only an array no data is send to the form
> 
>     curl_setopt($process, CURLOPT_POSTFIELDS, $data);
> 
> I have read somewhere that curl sends formdata with enctype="form/mulitpart"
> only if I provide an array not a string.
> 
> If I add "@filename" to the $data variable (string or array) it does not
> send the file to the form.
> 
> Each example I have found in the internet so far did not work.

I do not use the Curl functions directly. When possible I use fsockopen
as alternative and use this HTTP client class to submit any kind of HTTP
requests. Take a look at the test_http_post.php to see how simple is to
submit form with one or more file uploads.

http://www.phpclasses.org/httpclient



-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
I don't understand it. index.php should be a file and indeed it's a file, so
what does /index/index after it mean? There's no index directory under
directory where index.php resides.
-- 
View this message in context: 
http://www.nabble.com/Please-explain%3A-index.php-index-index-tp21578728p21578728.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
leledumbo schrieb:
I don't understand it. index.php should be a file and indeed it's a file, so
what does /index/index after it mean? There's no index directory under
directory where index.php resides.
Hi Leledumbo,
what are you talking about? I think you are confused on this:

http://www.domain.com/index

or this

http://www.domain.com/index.php

Yes this is a Front Controller situation (Pattern). Please show the Zend Framework or other Frameworks that implements this Pattern (maybe the Command Pattern too ).

Regards

Carlos

--- End Message ---
--- Begin Message ---


Carlos Medina-2 wrote:
> 
> this is a Front Controller situation (Pattern)
> 
Could you explain more on that? I've never seen anything like this in any
tutorial I've found on the net. I'm using kohana framework. So, if I have
index.php/index/index where does it actually go?
-- 
View this message in context: 
http://www.nabble.com/Please-explain%3A-index.php-index-index-tp21578728p21579231.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
2009/1/21 leledumbo <[email protected]>

>
>
>
> Carlos Medina-2 wrote:
> >
> > this is a Front Controller situation (Pattern)
> >
> Could you explain more on that? I've never seen anything like this in any
> tutorial I've found on the net. I'm using Kohana framework. So, if I have
> index.php/index/index where does it actually go?

  it goes to index.php , apache disregards what's after index.php Kohana the
reads that string, and loads the appropriate Controller / method. You can
hide the index.php from your users via apaches mod_rewrite. Refere to the
Kohana or Codeigniter doccumentation

>
> --
> View this message in context:
> http://www.nabble.com/Please-explain%3A-index.php-index-index-tp21578728p21579231.html
> Sent from the PHP - General mailing list archive at Nabble.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Torok, Alpar Istvan

--- End Message ---
--- Begin Message ---
Is this web server specific? I can't get it to run under Microsoft IIS, but
it works flawlessly in Apache.
-- 
View this message in context: 
http://www.nabble.com/Please-explain%3A-index.php-index-index-tp21578728p21579384.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---

Reply via email to