Re: [PHP] Re: 64bit vs. 32bit

2009-01-20 Thread Ross McKay
On Mon, 19 Jan 2009 18:39:40 -0800, James Colannino wrote:

I could be wrong, but I'll bet anything that Wine made use of the now
defunct vm86 component of the x86 architecture.  [...]

Yes, I believe that's true, and that it's not available when you compile
for x86-64. However... why? If you really need to run DOS programs,
there's always DOSBOX, or even FreeDOS running in QEMU or similar, and
the graphics support will be better than whatever Wine would have
allowed.
-- 
Ross McKay, Toronto, NSW Australia
Nobody ever rioted for austerity - George Monbiot

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



Re: [PHP] Re: 64bit vs. 32bit

2009-01-20 Thread Ross McKay
Micah Gersten wrote:

Linux can already address all the RAM on a 32 bit system with PAE.  The
advantage of 64 bit with regards to RAM is that a single process can
address more than 2.5 - 2.7 GB of RAM.

True, what I meant was processes on Linux will be able to address more.
Good catch. 

Even with PAE and 64GB of RAM, there's a physical limit on what a
process can address, 4GB, and that's further limited by resources that
must be mapped into the process space. IIRC, the number is more like
3.3GB or thereabouts, depending on the build and hardware. Unless, of
course, they're specifically coded to make use of PAE... :)
-- 
Ross McKay, Toronto, NSW Australia
My old man told me one time, you never get wise, you only get older
- Dandy Warhols

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



[PHP] Re: How to use SVN + PHP

2009-01-20 Thread Ross McKay
On Mon, 19 Jan 2009 22:32:49 +0100, Edmund Hertle wrote:

I'm thinking about implementing Subversion to an existing php project for
obvious reasons.

Yay! What Nathan said, plus a couple of comments from me...

[...]
My ideas about using SVN are these:
- Repository is managing trunk, branch and tag
- Live-server works as client of the rep, getting the latest tag
- Develop-server uses mainly latest trunk and of course branches as needed

Personally, I'd just work in the trunk. Even with multiple developers,
stick to working in the trunk. On release, copy the trunk to a tag to
preserve its state.

Branches are great for long-running diversions from the trunk, e.g. when
creating a whole new release with new features and potentially different
architecture, copy the trunk to a branch so that maintenance work can
continue on the branch, and perform new work on the trunk. Of course,
you can do that the other way around, new work on the branch and
maintenance on the trunk, but that means merging the branch into the
trunk at the end and potentially creating a new branch for
maintenance... i.e. the same result as the other method, but with more
effort.

Putting it another way: working in branches is good for maintaining
separate codebases concurrently, either because of feature differences
or platform differences (e.g. a Linux branch and a Windows branch).

NB: in Subversion, there really isn't proper support for either branches
or tags; we just emulate it by copying a folder to another folder. A tag
is then just a copied folder that is never altered again, and a branch
is a copied folder that is later modified. Convention has us calling
these things tags and branches, and calling the original folder the
trunk.

For simple websites, I tend to drop the trunk/tag/branch model entirely
and just work in the trunk. Some things just don't warrant the extra
work :) but they still benefit from revision control.

[...]
Is it possible to configure one client (here develop-server) to
automatically updating from rep if something is committed?

IMHO, that would be a Bad Thing® because it means only committing to the
repository when it works. Alternatively, it could mean releasing
untested changes to production, an even more Bad Thing®.

Better is to commit early, commit often and thus get deep undo through
Subversion's history of changes. Once you've tested your changes and are
happy that everything is working, and committed them all to the trunk,
copy the trunk to a tag and put that on the server.
-- 
Ross McKay, Toronto, NSW Australia
Let the laddie play wi the knife - he'll learn
- The Wee Book of Calvin

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



Re: [PHP] maybe we could all?

2009-01-20 Thread Robert Cummings
On Tue, 2009-01-20 at 01:35 +, Nathan Rixham wrote:
 and on the other side.. to open things up
 
 interface Object {
 }
 
 or
 
 abstract class Object {
 }
 
 or
 
 class Object {
 }

These braces are all wrong.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] developers life

2009-01-20 Thread Robert Cummings
On Mon, 2009-01-19 at 22:06 +, Nathan Rixham wrote:
 Robert Cummings wrote:
  On Mon, 2009-01-19 at 21:53 +, Nathan Rixham wrote:

  Robert Cummings wrote:
  
  On Mon, 2009-01-19 at 21:28 +, Nathan Rixham wrote:

  well just for the hell of it; and because I'm feeling worn..
 
  anybody else find the following true when you're a developer?
 
  - frequent bursts of side-tracking onto more interesting subjects
  - vast amount of inhuman focus, followed by inability to remain focussed
  - general tendancy to keep taking on projects, often for no good reason
  - inability to flip out of work mode at 5pm like the rest of the world
  -- [sub] not feeling normal unless worked you've extra; while other 
  professions demand overtime as little as an extra 15 minutes
  - constant learning (positive thing)
  - unlimited skill scope, if its on a computer you'll give it a go
  - amazing ability to prioritise (the wrong things)
  - all projects suddenly become uninteresting and all motivation is lost 
  at approx 65-85 percent completion
  - the code seems more important than the app (even though its not)
  - lots more but lost interest / focus
  
  Are you an INTP?
 
  http://www.personalitytest.net/cgi-bin/q.pl
 

  thanks for that rob, but predicatably I've got to number 26 and stopped 
  - penetrating insight, lol
  
 
  Then your not INTP enough :) An INTP would want to know.
 
  Cheers,
  Rob.

 and finished in 3 sessions: Your personality type is INTP shock

*lol* There ya go!

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] maybe we could all?

2009-01-20 Thread Robert Cummings
On Mon, 2009-01-19 at 19:59 -0800, Kyle Terry wrote:

 I demand Dan and Nathan to go to bed now.

Together?

;)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] maybe we could all?

2009-01-20 Thread Jason Pruim


On Jan 19, 2009, at 6:57 PM, Nathan Rixham wrote:


Project: PHP Common Objects and Datatypes

method: for everybody who wishes to contribute, and for everybody  
to review, discuss and work on the same classes.


what are they: classes we can all use, that have been discussed,  
reviewed and agreed between many great developers around the world.


the classes: all the common ones we can re-use from User to  
Address Email Article and beyond, also perhaps wrappers for  
primatives / scalars.


expanding: extra abstract classes we can also use, common  
interfaces for the above; eventually maybe utility classes as well.


the idea wouldn't be a framework or another php classes, more of a  
repo full of common classes to save us all some time, and as a nice  
project anybody can contribute to and which we can all discuss and  
debate the finer grained details.


additional: these would maybe be best to stick to common usage, so  
if we have say a User class in our own project with specific  
needs, we can simply extend the base user class and add our own  
functionality.


thinking of putting this distraction and debate time to good use  
that we can all benefit from.


would also propose sticking to php 5.X [we could decide a version]  
and obviously OO; but then if the procedural guys wanted they could  
as well.


maybe it's just me, no commitment, no solid work, just bits of  
contrib and discussion / feedback.


follow? thoughts? comments? interest?

[everybody, even tony, would need max input and discussion to get  
the best solutions for us all, and class at a time should mean we  
get a steady stream of classes to the repo.. think about 6 months  
down the line]


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




Morning Nathan!

Count me in! Not sure what I can do to help yet, but more then  
willing to pitch in and give my opinion where I can at least make an  
attempt at sounding intelligent! :)



--
Jason Pruim
japr...@raoset.com
616.399.2355





Re: [PHP] maybe we could all?

2009-01-20 Thread Richard Heyes
 ...

Um, PEAR?

-- 
Richard Heyes

HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 17th)

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



RE: [PHP] maybe we could all?

2009-01-20 Thread Jay Blanchard
[snip]
On Tue, 2009-01-20 at 01:35 +, Nathan Rixham wrote:
 and on the other side.. to open things up
 
 interface Object {
 }
 
 or
 
 abstract class Object {
 }
 
 or
 
 class Object {
 }

These braces are all wrong.
[/snip]

Uh...no they're not. (And you knew I was going to say that :) )

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



[PHP] PHP-Java Bridge: Connect PHP to MySQL using JNDI

2009-01-20 Thread jpmad4it

Hi everyone!

This is driving me nuts!

I have setup a Linux webserver. Tomcat is running at the backend and is
connected to Apache at the frontend using mod_proxy. At the moment I have a
few test applications setup, which involves Apache sending JSP requests to
Tomcat via mod_proxy. They all work fine.

I also have some JSP code that uses a JNDI connection to the MySQL database
using MySQL Connector / J. All the configuration is done in Tomcat in the
XML files. This works fine too.

Now what I want to do is use PHP code to connect to MySQL using JNDI,
instead of using JSP code. This is where the sourceforge open-source
PHP-Java Bridge comes into it.

The php-java bridge is deployed in Tomcat's webapps folder (it came as a
*.war file). This is all thats necessary for it to work according to their
tech support.

Is there anyone around that knows how to code this using PHP?

I had a go at this, and my (most-likely awful) attempt is here:

?php
require_once(java/Java.inc);
require_once(java/JavaBridge.inc);

try {
$dbh = new PDO(java:comp/env/jdbc/TestDB);
foreach ($dbh-query('SELECT * from testdata') as $row) {
  echo pre;  
  print_r($row);
  echo /pre;
}
$dbh = null;
} catch (PDOException $e) {
  print Error!:  . $e-getMessage() . br/;
  die();
}
?

Now I don't think that PDO will support what I have done, and that is to try
and call the JNDI connection. I get the error message Error!: could not
find driver

Another attempt was to use the following code:

?php
require_once(java/Java.inc);
require_once(java/JavaBridge.inc);

$conn = mysql_connect(java:comp/env/jdbc/TestDB);
print $conn;
?

But this gave the error:

Warning - mysql_connect() [ function.mysql-connect function.mysql-connect ]:
Unknown MySQL server host 'java' (1)

I guess this post could have gone in the Java forum too, but I thought it
was more of a PHP issue?

Any help would be great. 

rgs J
-- 
View this message in context: 
http://www.nabble.com/PHP-Java-Bridge%3A-Connect-PHP-to-MySQL-using-JNDI-tp21562460p21562460.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



[PHP] mysql_query and my.cnf?

2009-01-20 Thread Waynn Lue
Hey guys,

I've been noticing that large queries cause a connection lost to mysql
server problem, so I'm trying to figure out what settings I need to tweak in
my my.cnf file to get it to work.  I know people change the
max-allowed-packet variable, but I'm trying to figure out what the correct
section of the my.cnf is.  Is it just [mysql]?

Waynn


Re: [PHP] developers life

2009-01-20 Thread Jason Pruim


On Jan 19, 2009, at 10:12 PM, Paul M Foster wrote:


On Mon, Jan 19, 2009 at 10:23:49PM -, c...@l-i-e.com wrote:



ESTJ



Me too.


After answering 68 questions (All that displayed) it told me I didn't  
answer them all... So if I want to go in rewrite the stupid thing so  
that it works properly... What does that make me? :P




--
Jason Pruim
japr...@raoset.com
616.399.2355





Re: [PHP] developers life

2009-01-20 Thread Robert Cummings
On Tue, 2009-01-20 at 08:16 -0500, Jason Pruim wrote:
 On Jan 19, 2009, at 10:12 PM, Paul M Foster wrote:
 
  On Mon, Jan 19, 2009 at 10:23:49PM -, c...@l-i-e.com wrote:
 
 
  ESTJ
 
 
  Me too.
 
 After answering 68 questions (All that displayed) it told me I didn't  
 answer them all... So if I want to go in rewrite the stupid thing so  
 that it works properly... What does that make me? :P

Silly for not hitting the back button.

:)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



[PHP] Code Not entering the value in the Database

2009-01-20 Thread Chris Carter

Hi,

My code is not giving error but not doing the desired action.

I need to append a value in database just when the user logs in after
entering the username and password. So I am not presenting the user with a
account but just a thank you page.

Steps:

1) User enters the user name and password
2) The login form contains a hidden field with a data
3) After hitting the Submit button the username and password is checked.
4) The hidden data is entered in the database.
5) A mail is sent to the user and he gets a Thank You page.
6) If verification fails then he gets a registeration page.

Here is the code, I have been struggling with:

?php

//include file for db entries, this part is working fine
file.inc
$conn = mysql_connect($host, $user, $password) or 
die(mysql_error());
$db = mysql_select_db($dbName, $conn) or die(mysql_error());

   // insert new entry in the database if entry submitted

  $emailAddress = $_POST['emailAddress'];
  $password = $_POST['password'];
   //$_SESSION['testing'] = $_POST['emailAddress'];
  // insert new entry into database
  $sql5 = SELECT * FROM userstable WHERE 
emailAddress='$emailAddress' AND
password = '$password';
  $result5=mysql_query($sql5);

// Mysql_num_row is counting table row
$count5=mysql_num_rows($result5);

// If result matched $myusername and $mypassword, table row 
must be 1 row
if($count5==1){

$rowset5 = mysql_fetch_array($result5);
$emailAddress = $rowset5['emailAddress'];
$password = $rowset5['password'];

//answer insertion
  $hiddendata= $_POST['hiddendata'];

//Email body that is sent to the logged in user.
$body = Hello $fName\n\nThank You for participating; 

 $sql = insert into `userstable` (hiddendata) VALUES 
('$hiddendata');

mail($emailAddress, Thank you for interest, $body, From: 
a...@abc.com);
header(Location: thankYou.php);

}
else {
header(location:you-need-to-register.php);
}
?

What exactly am I missing.

Thanks in advance,

Chris
-- 
View this message in context: 
http://www.nabble.com/Code-Not-entering-the-value-in-the-Database-tp21564252p21564252.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



[PHP] session mysteriously killed

2009-01-20 Thread clive

Hi

we have an web based intranet system, users started reporting that they 
kept getting logged out, and the log outs were happening randomly.


There is no coded any were that refers to sessions other than the 
login/logout and header file.


Ive increased the session.cookie_lifetime to something stupid like 6 
days, it was initially zero,, I might set it back to this, I also 
increased the session.gc_maxlifetime to a huge value, but still the 
problem persists.


I have a bit of code in the header (where we check if the user has valid 
session credentials) logging messages when someone is logged out and 
from what file they were accessing with they got logged out, there is no 
discernible pattern, Im stumped,


Does anyone have any idea how the session variables can be disappearing?

Clive


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



Re: [PHP] Code Not entering the value in the Database

2009-01-20 Thread HostWare Kft.


Did I miss something, or you really left the  execution of the last $sql?
After you put the 'INSERT INTO...' string in $sql, you have to mysql_query 
it, or you won't get any result.


SanTa

- Original Message - 
From: Chris Carter chandan9sha...@yahoo.com

To: php-general@lists.php.net
Sent: Tuesday, January 20, 2009 3:34 PM
Subject: [PHP] Code Not entering the value in the Database




Hi,

My code is not giving error but not doing the desired action.

I need to append a value in database just when the user logs in after
entering the username and password. So I am not presenting the user with a
account but just a thank you page.

Steps:

1) User enters the user name and password
2) The login form contains a hidden field with a data
3) After hitting the Submit button the username and password is checked.
4) The hidden data is entered in the database.
5) A mail is sent to the user and he gets a Thank You page.
6) If verification fails then he gets a registeration page.

Here is the code, I have been struggling with:

?php

//include file for db entries, this part is working fine
file.inc
$conn = mysql_connect($host, $user, $password) or die(mysql_error());
$db = mysql_select_db($dbName, $conn) or die(mysql_error());

  // insert new entry in the database if entry submitted

  $emailAddress = $_POST['emailAddress'];
  $password = $_POST['password'];
   //$_SESSION['testing'] = $_POST['emailAddress'];
  // insert new entry into database
  $sql5 = SELECT * FROM userstable WHERE emailAddress='$emailAddress' AND
password = '$password';
  $result5=mysql_query($sql5);

// Mysql_num_row is counting table row
$count5=mysql_num_rows($result5);

// If result matched $myusername and $mypassword, table row must be 1 row
if($count5==1){

$rowset5 = mysql_fetch_array($result5);
$emailAddress = $rowset5['emailAddress'];
$password = $rowset5['password'];

//answer insertion
  $hiddendata= $_POST['hiddendata'];

//Email body that is sent to the logged in user.
$body = Hello $fName\n\nThank You for participating;

$sql = insert into `userstable` (hiddendata) VALUES ('$hiddendata');

mail($emailAddress, Thank you for interest, $body, From: a...@abc.com);
header(Location: thankYou.php);

}
else {
header(location:you-need-to-register.php);
}
?

What exactly am I missing.

Thanks in advance,

Chris
--
View this message in context: 
http://www.nabble.com/Code-Not-entering-the-value-in-the-Database-tp21564252p21564252.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




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



Re: [PHP] developers life

2009-01-20 Thread Jason Pruim


On Jan 20, 2009, at 9:18 AM, Robert Cummings wrote:


On Tue, 2009-01-20 at 08:16 -0500, Jason Pruim wrote:

On Jan 19, 2009, at 10:12 PM, Paul M Foster wrote:


On Mon, Jan 19, 2009 at 10:23:49PM -, c...@l-i-e.com wrote:



ESTJ



Me too.


After answering 68 questions (All that displayed) it told me I didn't
answer them all... So if I want to go in rewrite the stupid thing so
that it works properly... What does that make me? :P


Silly for not hitting the back button.

:)


But alas... I did 3 times :P figured once wasn't enough... had to  
keep checking it :)




--
Jason Pruim
japr...@raoset.com
616.399.2355





Re: [PHP] session mysteriously killed

2009-01-20 Thread ceo

Are you perhaps storing the session data in a DB?



If the field type is, say, text, and you put something large in $_SESSION, 
you'll have truncated data, the session manager can't unserialize it, and you 
will have a silent failure when they try to do their next task -- They get 
logged out and there it is.



Add a custom error handler and you can track what is going on, by logging each 
function call to the handler.



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



Re: [PHP] PHP-Java Bridge: Connect PHP to MySQL using JNDI

2009-01-20 Thread ceo

In general, if you are trying to get DB connections to work in a hybrid 
situation, and no native driver is behaving, try ODBC.



It's crude, slow, and not pretty, but it should work.



You can set it up so that you can go back later and dink around with drivers 
and re-compiling, but at least have a known working solution in the meantime.



I don't do Java, so that's just general advice...



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



Re: [PHP] session mysteriously killed

2009-01-20 Thread clive

c...@l-i-e.com wrote:

Are you perhaps storing the session data in a DB?

  

No its using the file system


If the field type is, say, text, and you put something large in $_SESSION, 
you'll have truncated data, the session manager can't unserialize it, and you 
will have a silent failure when they try to do their next task -- They get 
logged out and there it is.



Add a custom error handler and you can track what is going on, by logging each 
function call to the handler.

  
that may be the only option here, the intranet app is being replaced, so 
Im trying not to do much work on the old one, just this strangeness is 
getting annoying.




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



Re: [PHP] 64bit vs. 32bit

2009-01-20 Thread Per Jessen
dbrooke wrote:

 Hello,
 I am interested in hearing opinions about if there
 are reasons to stay with a 32bit php/apache if there
 is 64bit options available. What are the pros/cons
 in running in the different architectures?

Unless you 

1) have lots of RAM (e.g. 16Gb or more) that you need to utilize
efficiently or

2) your processing is very CPU-bound, e.g. scientific or graphics code.

you won't gain anything by moving to a 64bit OS/Apache.


/Per Jessen, Zürich


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



[PHP] Client/Server Printing

2009-01-20 Thread Paul M Foster
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

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



Re: [PHP] Code Not entering the value in the Database

2009-01-20 Thread Jan G.B.
2009/1/20 Chris Carter chandan9sha...@yahoo.com:

 Hi,

 My code is not giving error but not doing the desired action.

But it can do a lot more than your desired action.


   // insert new entry in the database if entry submitted

  $emailAddress = $_POST['emailAddress'];
  $password = $_POST['password'];
  $sql5 = SELECT * FROM userstable WHERE 
 emailAddress='$emailAddress' AND
 password = '$password';
  $result5=mysql_query($sql5);

Do yourself a favor and read this from A to Z:
http://de3.php.net/manual/en/security.php
Imagine I send the String: x' OR id=1/*
What would the mysql read now?

SELECT * FROM userstable WHERE emailAddress='x' OR id=1/*' AND ...
everything after /* is not being parsed.


header(location:you-need-to-register.php);
correct would be header(location: http://foo/you-need-to-register.php;);


 What exactly am I missing.

http://php.net/docs.php


Byebye

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



Re: [PHP] mysql_query and my.cnf?

2009-01-20 Thread Richard Heyes
 ...

Hi,

You might get more help on the MySQL list.

-- 
Richard Heyes

HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 17th)

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



Re: [PHP] Client/Server Printing

2009-01-20 Thread clive
Ideally you want the document to print with the least amount of click or 
without having to open up 3rd party applications, would it be possible 
for the server to print to documents, I have done something like this 
before on a windows machine.



Clive

Paul M Foster wrote:

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

  




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



Re: [PHP] session mysteriously killed

2009-01-20 Thread clive

further to my last email,

the bit of code that checks if the person is logged in looks something 
like this:


if ( isset ( $_SESSION['loggedin']  )  )   { 


   //check some other session variables

} else {

   //log reason for logging the user out
   //redirect to login page

}

The variable, $_COOKIE['PHPSESSID'], has a value when a log out occurs 
and when I check the session save path, a file exists that corresponds 
the PHPSESSID sent via the cookie and it has all the right values, so 
$_SESSION['loggedin'] does exits and has a value.


Its almost like php has a problem accessing the sess_ 
file sometimes.


Clive


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



Re: [PHP] PHP-Java Bridge: Connect PHP to MySQL using JNDI

2009-01-20 Thread jpmad4it

Thanks.

However, I'm using this process as a test. In the proper application we will
be using a JDBC or JDNI connection initiated by PHP to connect to our IDMS
database. Its complicated but it means we have to use the PHP-Java Bridge,
Java and JDBC. so we can't use ODBC.

I'm using this as a test to get my head around the code. I've resorted to
try and get it working with the JDBC connection coded in the script for now,
and i'll move on to JNDI later. I have now got this code:

?php
require_once (java/Java.inc);

$drivermanager = new JavaClass('java.sql.DriverManager');

$conn1 =
$drivermanager-getConnection(jdbc:mysql://localhost:3306/javatest?user=javauserpassword=javadude)
or die(Unable to connect to MySQL);

print $conn1;
echo 'br /br /';

mysql_select_db(javatest, $conn1) or die('Could not connect: ' .
mysql_error());

$result = mysql_query(SELECT id, foo, bar FROM testdata);
while ($row = mysql_fetch_array($result)) {
print ID:.$row{'id'}. Name:.$row{'foo'}. 
.$row{'bar'}.br;
}
mysql_close($conn1);

?

This gives the following reply:

com.mysql.jdbc.jdbc4connect...@22622262

Could not connect: 

It seems to connect Ok, but I think it gets stuck at the mysql_select_db()
function because no database information is being extracted.

I've tested a few things, and if I remove the $conn1 from this line:

mysql_select_db(javatest, $conn1) or die('Could not connect: ' .
mysql_error());

to give this:

mysql_select_db(javatest) or die('Could not connect: ' . mysql_error());

I get the following error:

com.mysql.jdbc.jdbc4connect...@22862286

Could not connect: Access denied for user 'root'@'localhost' (using
password: NO)

So I 'think' this indicates that the first lot of code connects OK - it just
can't access the database. Maybe I'm using the wrong code to select the
database??:

mysql_select_db(javatest, $conn1) ;

Can anyone see why my mysql_select_db() function is not working? Maybe its
not possible to use this with the way that I have used the
drivermanager-getConnection method?

Please help :-((
-- 
View this message in context: 
http://www.nabble.com/PHP-Java-Bridge%3A-Connect-PHP-to-MySQL-using-JNDI-tp21562460p21565513.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



Re: [PHP] developers life

2009-01-20 Thread ceo

 catch-all?



Yes, with lots of spam filtering, including a custom one in PHP.



Got tired of waiting for webmail to run its filters.



PHP cron job on the server with IMAP.



Comes in handy for web sign-ups and the following spam -- And for identifying 
spammers.  I don't work with spammers.

http://richardlynch.blogspot.com/2007/09/adobe-spams.html





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



Re: [PHP] session mysteriously killed

2009-01-20 Thread Edmund Hertle
2009/1/20 clive clive_li...@immigrationunit.com

 further to my last email,

 the bit of code that checks if the person is logged in looks something like
 this:

 if ( isset ( $_SESSION['loggedin']  )  )   {
   //check some other session variables

 } else {

   //log reason for logging the user out
   //redirect to login page

 }

Is the session completly destroyed? Try

} else {
 print_r($_SESSION);
}


Re: [PHP] Client/Server Printing

2009-01-20 Thread Kyle Terry
On Tue, Jan 20, 2009 at 7:24 AM, clive clive_li...@immigrationunit.comwrote:

 Ideally you want the document to print with the least amount of click or
 without having to open up 3rd party applications, would it be possible for
 the server to print to documents, I have done something like this before on
 a windows machine.


 Clive

 Paul M Foster wrote:

 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






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


We used a windows only extension to print from PHP at my last job. Might
want to take a look into that. http://us2.php.net/manual/en/book.printer.php

-- 
Kyle Terry | www.kyleterry.com


Re: [PHP] mysql_query and my.cnf?

2009-01-20 Thread Jan G.B.
2009/1/20 Waynn Lue waynn...@gmail.com:
 Hey guys,

 I've been noticing that large queries cause a connection lost to mysql
 server problem, so I'm trying to figure out what settings I need to tweak in
 my my.cnf file to get it to work.

Have you had a look on your (mysql) Logfiles and/or are you echo'ing
mysql_error() or $dbhandle-error in case of mysqli?
I guess there must be a hint for the reason of the connection lost.

 I know people change the
 max-allowed-packet variable, but I'm trying to figure out what the correct
 section of the my.cnf is.  Is it just [mysql]?

Try that.
http://tinyurl.com/9x3gws

Regards

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



Re: [PHP] maybe we could all?

2009-01-20 Thread Kyle Terry
On Tue, Jan 20, 2009 at 8:52 AM, Shawn McKenzie nos...@mckenzies.netwrote:

 Kyle Terry wrote:
  On Mon, Jan 19, 2009 at 6:31 PM, Nathan Rixham nrix...@gmail.com
 wrote:
 
  Eric Butera wrote:
 
  On Mon, Jan 19, 2009 at 9:13 PM, Kyle Terry k...@kyleterry.com
 wrote:
 
  On Mon, Jan 19, 2009 at 6:07 PM, Daniel Brown danbr...@php.net
 wrote:
 
   On Mon, Jan 19, 2009 at 19:58, Edmund Hertle
  edmund.her...@student.kit.edu wrote:
 
  Well, I think we should not go to fast... maybe we are setting up
 SVN,
  webspace, domain, mailing-list and in the end this is only used by
 4-5
  people. Because than this can be discussed on this mailinglist. But
 if
 
  there
 
  are quite enough people interested, it would be indeed a good idea
 to
 
  start
 
  some other kind of communication...
 
 I flat-out disagree with this, Ed.  Nothing at all against you,
  though.
 
This is the General list for PHP, and while this project is
  PHP-related (and general in nature), if we allow even the
 regulars
  to do so here, how can we then tell others that we won't allow them
 to
  discuss their PHP-related projects on this list?
 
Putting the code on a proper system to begin with means no
  screwing around later when the project is running at full steam.
  And even if there are only four or five people working on it, if
 those
  folks put in a good effort, they can work wonders.
 
  --
  /Daniel P. Brown
  daniel.br...@parasane.net || danbr...@php.net
  http://www.parasane.net/ || http://www.pilotpig.net/
  Unadvertised dedicated server deals, too low to print - email me to
 find
  out!
 
   I work on a development team of 3; me and 2 others. 1 of which only
  develops
  about a quarter of his time here. Even with my co worker sitting next
 to
  me,
  if we weren't using a repo, we would both be at a complete loss (right
  word?).
 
  --
  Kyle Terry | www.kyleterry.com
 
 
  I have been using svn for 3 years by myself.  Recently I talked my
  other co workers to play with it and they love it.  But even in an
  army of one it's amazing to be able to figure out what I messed up
  last week or why I decided to change something at 5:00.  People have
  wrote books on it though, so I'll hush.
 
  still up :p
 
  dan - great offer, I'd like to take you up on it [could we install any
  extra needed software, such as a wiki / list or something that allows
  discussion and document storage made website available]
  svn - a must imho
 
  consideration:
  been thinking 2 things
  1 - this could be a lot of noise on the list; perhaps an approach of rfc
  and publish every idea, post link to it here so anybody can contribute,
 then
  go from there.
  discuss [ wiki needed? ]
 
  wiki will definitely be needed.
 
  2 - actually that was both in one sentance
 
  maybe first rfc should be super class for all  (our) objects and
 if
  so what
 
  + a name, cos if we need to start prefixing.. and it can't be 4LC as
 can't
  start with a number :p
 
  The world's object?
 
 
  this will be massively interesting..
 
 
 
 
 Given Common Objects and Datatypes, has anyone proposed COD Pieces?

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

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


Project COD: For the World, By the World.

-- 
Kyle Terry | www.kyleterry.com


[PHP] ANNOUNCEMENT: ModBox - Open Platform as a Service

2009-01-20 Thread cl
After posting to this list to see if it is appropriate and getting good 
feedback, I'm posting an announcement I think is very relative to this list 
as I have been using PHP ever since it was a Perl script (PHP/FI) and have 
been heavily influenced by it's concept and evolution when creating what I 
am announcing. So the announcement is the launch of something I have been 
working on in my spare time for a long time and what I believe will be a 
logical next step in Internet development - ModBox an Open Platform as a 
Service (OPaaS). Ok, what the #...@#$ is OPaaS? OPaaS is PaaS, but open. Think 
Force.com/Google App Engine/Amazon EC2 - but open. Really open. Not fake 
open like so much other BS services that try to lock you in. In a nutshell, 
ModBox is a Web-based distributed development environment that is completely 
neutral in every way. So, you can use any infrastructure you want, any 
programming language, any server, any OS, any database, etc. to 
create/distribute applications. Also, because ModBox works over standard 
HTTP, you can incorporate existing applications or web services into the 
applications you create. ModBox brings all the pieces together seemlessly 
for programmers and users. I hope I have borrowed the best ideas from IDE's, 
RAD, frameworks, Web services grid/cloud computing and Open Source to make a 
logical ecosystem which puts a much needed front-end/face on all of it. This 
list is the first place I have announced ModBox and I welcome you to Rock 
the Box and let me know if it makes as much sense to you as it does to me. I 
would, of course greatly appreciate any feedback as I am not so bold to 
think I have cracked the code on the 1.0. The URL is below.

ModBox - Open Platform as a Service:
http://www.sullivansoftwaresystems.com/modbox

Thanks for your time.

Brian Sullivan
Sullivan Software Systems
ModBox - Rock the Box.


Re: [PHP] ANNOUNCEMENT: ModBox - Open Platform as a Service

2009-01-20 Thread Kyle Terry
On Tue, Jan 20, 2009 at 9:09 AM, c...@wizzyweb.com wrote:

 After posting to this list to see if it is appropriate and getting good
 feedback, I'm posting an announcement I think is very relative to this list
 as I have been using PHP ever since it was a Perl script (PHP/FI) and have
 been heavily influenced by it's concept and evolution when creating what I
 am announcing. So the announcement is the launch of something I have been
 working on in my spare time for a long time and what I believe will be a
 logical next step in Internet development - ModBox an Open Platform as a
 Service (OPaaS). Ok, what the #...@#$ is OPaaS? OPaaS is PaaS, but open.
 Think
 Force.com/Google App Engine/Amazon EC2 - but open. Really open. Not fake
 open like so much other BS services that try to lock you in. In a nutshell,
 ModBox is a Web-based distributed development environment that is
 completely
 neutral in every way. So, you can use any infrastructure you want, any
 programming language, any server, any OS, any database, etc. to
 create/distribute applications. Also, because ModBox works over standard
 HTTP, you can incorporate existing applications or web services into the
 applications you create. ModBox brings all the pieces together seemlessly
 for programmers and users. I hope I have borrowed the best ideas from
 IDE's,
 RAD, frameworks, Web services grid/cloud computing and Open Source to make
 a
 logical ecosystem which puts a much needed front-end/face on all of it.
 This
 list is the first place I have announced ModBox and I welcome you to Rock
 the Box and let me know if it makes as much sense to you as it does to me.
 I
 would, of course greatly appreciate any feedback as I am not so bold to
 think I have cracked the code on the 1.0. The URL is below.

 ModBox - Open Platform as a Service:
 http://www.sullivansoftwaresystems.com/modbox

 Thanks for your time.

 Brian Sullivan
 Sullivan Software Systems
 ModBox - Rock the Box.


You already posted this once...

-- 
Kyle Terry | www.kyleterry.com


Re: [PHP] maybe we could all?

2009-01-20 Thread Jason Pruim


On Jan 20, 2009, at 12:02 PM, Kyle Terry wrote:

On Tue, Jan 20, 2009 at 8:52 AM, Shawn McKenzie  
nos...@mckenzies.netwrote:



Kyle Terry wrote:

On Mon, Jan 19, 2009 at 6:31 PM, Nathan Rixham nrix...@gmail.com

wrote:



Eric Butera wrote:


On Mon, Jan 19, 2009 at 9:13 PM, Kyle Terry k...@kyleterry.com

wrote:



On Mon, Jan 19, 2009 at 6:07 PM, Daniel Brown danbr...@php.net

wrote:


 On Mon, Jan 19, 2009 at 19:58, Edmund Hertle

edmund.her...@student.kit.edu wrote:

Well, I think we should not go to fast... maybe we are  
setting up

SVN,
webspace, domain, mailing-list and in the end this is only  
used by

4-5
people. Because than this can be discussed on this  
mailinglist. But

if



there

are quite enough people interested, it would be indeed a  
good idea

to



start


some other kind of communication...

   I flat-out disagree with this, Ed.  Nothing at all against  
you,

though.

  This is the General list for PHP, and while this project is
PHP-related (and general in nature), if we allow even the

regulars
to do so here, how can we then tell others that we won't  
allow them

to

discuss their PHP-related projects on this list?

  Putting the code on a proper system to begin with means no
screwing around later when the project is running at full steam.
And even if there are only four or five people working on it, if

those

folks put in a good effort, they can work wonders.

--
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email  
me to

find

out!

 I work on a development team of 3; me and 2 others. 1 of  
which only

develops
about a quarter of his time here. Even with my co worker  
sitting next

to

me,
if we weren't using a repo, we would both be at a complete  
loss (right

word?).

--
Kyle Terry | www.kyleterry.com



I have been using svn for 3 years by myself.  Recently I talked my
other co workers to play with it and they love it.  But even in an
army of one it's amazing to be able to figure out what I messed up
last week or why I decided to change something at 5:00.  People  
have

wrote books on it though, so I'll hush.


still up :p

dan - great offer, I'd like to take you up on it [could we  
install any
extra needed software, such as a wiki / list or something that  
allows

discussion and document storage made website available]
svn - a must imho

consideration:
been thinking 2 things
1 - this could be a lot of noise on the list; perhaps an  
approach of rfc
and publish every idea, post link to it here so anybody can  
contribute,

then

go from there.
discuss [ wiki needed? ]


wiki will definitely be needed.


2 - actually that was both in one sentance

maybe first rfc should be super class for all  (our)  
objects and

if

so what

+ a name, cos if we need to start prefixing.. and it can't be  
4LC as

can't

start with a number :p


The world's object?



this will be massively interesting..





Given Common Objects and Datatypes, has anyone proposed COD  
Pieces?


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

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



Project COD: For the World, By the World.


Would version 2 then be called CODE Common Objects and Datatypes  
Enhanced?



--
Jason Pruim
japr...@raoset.com
616.399.2355





Re: [PHP] maybe we could all?

2009-01-20 Thread Kyle Terry
On Tue, Jan 20, 2009 at 9:28 AM, Jason Pruim japr...@raoset.com wrote:


 On Jan 20, 2009, at 12:02 PM, Kyle Terry wrote:

 On Tue, Jan 20, 2009 at 8:52 AM, Shawn McKenzie nos...@mckenzies.net
 wrote:

 Kyle Terry wrote:

 On Mon, Jan 19, 2009 at 6:31 PM, Nathan Rixham nrix...@gmail.com

 wrote:


 Eric Butera wrote:

 On Mon, Jan 19, 2009 at 9:13 PM, Kyle Terry k...@kyleterry.com

 wrote:


 On Mon, Jan 19, 2009 at 6:07 PM, Daniel Brown danbr...@php.net

 wrote:


  On Mon, Jan 19, 2009 at 19:58, Edmund Hertle

 edmund.her...@student.kit.edu wrote:

 Well, I think we should not go to fast... maybe we are setting up

 SVN,

 webspace, domain, mailing-list and in the end this is only used by

 4-5

 people. Because than this can be discussed on this mailinglist. But

 if


 there

 are quite enough people interested, it would be indeed a good idea

 to


 start

 some other kind of communication...

I flat-out disagree with this, Ed.  Nothing at all against you,
 though.

   This is the General list for PHP, and while this project is
 PHP-related (and general in nature), if we allow even the

 regulars

 to do so here, how can we then tell others that we won't allow them

 to

 discuss their PHP-related projects on this list?

   Putting the code on a proper system to begin with means no
 screwing around later when the project is running at full steam.
 And even if there are only four or five people working on it, if

 those

 folks put in a good effort, they can work wonders.

 --
 /Daniel P. Brown
 daniel.br...@parasane.net || danbr...@php.net
 http://www.parasane.net/ || http://www.pilotpig.net/
 Unadvertised dedicated server deals, too low to print - email me to

 find

 out!

  I work on a development team of 3; me and 2 others. 1 of which only

 develops
 about a quarter of his time here. Even with my co worker sitting next

 to

 me,
 if we weren't using a repo, we would both be at a complete loss (right
 word?).

 --
 Kyle Terry | www.kyleterry.com


 I have been using svn for 3 years by myself.  Recently I talked my
 other co workers to play with it and they love it.  But even in an
 army of one it's amazing to be able to figure out what I messed up
 last week or why I decided to change something at 5:00.  People have
 wrote books on it though, so I'll hush.

 still up :p

 dan - great offer, I'd like to take you up on it [could we install any
 extra needed software, such as a wiki / list or something that allows
 discussion and document storage made website available]
 svn - a must imho

 consideration:
 been thinking 2 things
 1 - this could be a lot of noise on the list; perhaps an approach of rfc
 and publish every idea, post link to it here so anybody can contribute,

 then

 go from there.
 discuss [ wiki needed? ]


 wiki will definitely be needed.

 2 - actually that was both in one sentance

 maybe first rfc should be super class for all  (our) objects and

 if

 so what

 + a name, cos if we need to start prefixing.. and it can't be 4LC as

 can't

 start with a number :p


 The world's object?


 this will be massively interesting..




 Given Common Objects and Datatypes, has anyone proposed COD Pieces?

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

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


 Project COD: For the World, By the World.


 Would version 2 then be called CODE Common Objects and Datatypes
 Enhanced?


 --
 Jason Pruim
 japr...@raoset.com
 616.399.2355




Perfect!

-- 
Kyle Terry | www.kyleterry.com


Re: [PHP] maybe we could all?

2009-01-20 Thread Shawn McKenzie
Kyle Terry wrote:
 On Mon, Jan 19, 2009 at 6:31 PM, Nathan Rixham nrix...@gmail.com wrote:
 
 Eric Butera wrote:

 On Mon, Jan 19, 2009 at 9:13 PM, Kyle Terry k...@kyleterry.com wrote:

 On Mon, Jan 19, 2009 at 6:07 PM, Daniel Brown danbr...@php.net wrote:

  On Mon, Jan 19, 2009 at 19:58, Edmund Hertle
 edmund.her...@student.kit.edu wrote:

 Well, I think we should not go to fast... maybe we are setting up SVN,
 webspace, domain, mailing-list and in the end this is only used by 4-5
 people. Because than this can be discussed on this mailinglist. But if

 there

 are quite enough people interested, it would be indeed a good idea to

 start

 some other kind of communication...

I flat-out disagree with this, Ed.  Nothing at all against you,
 though.

   This is the General list for PHP, and while this project is
 PHP-related (and general in nature), if we allow even the regulars
 to do so here, how can we then tell others that we won't allow them to
 discuss their PHP-related projects on this list?

   Putting the code on a proper system to begin with means no
 screwing around later when the project is running at full steam.
 And even if there are only four or five people working on it, if those
 folks put in a good effort, they can work wonders.

 --
 /Daniel P. Brown
 daniel.br...@parasane.net || danbr...@php.net
 http://www.parasane.net/ || http://www.pilotpig.net/
 Unadvertised dedicated server deals, too low to print - email me to find
 out!

  I work on a development team of 3; me and 2 others. 1 of which only
 develops
 about a quarter of his time here. Even with my co worker sitting next to
 me,
 if we weren't using a repo, we would both be at a complete loss (right
 word?).

 --
 Kyle Terry | www.kyleterry.com


 I have been using svn for 3 years by myself.  Recently I talked my
 other co workers to play with it and they love it.  But even in an
 army of one it's amazing to be able to figure out what I messed up
 last week or why I decided to change something at 5:00.  People have
 wrote books on it though, so I'll hush.

 still up :p

 dan - great offer, I'd like to take you up on it [could we install any
 extra needed software, such as a wiki / list or something that allows
 discussion and document storage made website available]
 svn - a must imho

 consideration:
 been thinking 2 things
 1 - this could be a lot of noise on the list; perhaps an approach of rfc
 and publish every idea, post link to it here so anybody can contribute, then
 go from there.
 discuss [ wiki needed? ]
 
 wiki will definitely be needed.
 
 2 - actually that was both in one sentance

 maybe first rfc should be super class for all  (our) objects and if
 so what

 + a name, cos if we need to start prefixing.. and it can't be 4LC as can't
 start with a number :p
 
 The world's object?
 

 this will be massively interesting..

 
 
 
Given Common Objects and Datatypes, has anyone proposed COD Pieces?

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

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



Re: [PHP] ANNOUNCEMENT: ModBox - Open Platform as a Service

2009-01-20 Thread cl

  - Original Message - 
  From: Kyle Terry 
  To: c...@wizzyweb.com 
  Cc: php-general@lists.php.net 
  Sent: Tuesday, January 20, 2009 12:14 PM
  Subject: Re: [PHP] ANNOUNCEMENT: ModBox - Open Platform as a Service





  On Tue, Jan 20, 2009 at 9:09 AM, c...@wizzyweb.com wrote:

After posting to this list to see if it is appropriate and getting good
feedback, I'm posting an announcement I think is very relative to this list
as I have been using PHP ever since it was a Perl script (PHP/FI) and have
been heavily influenced by it's concept and evolution when creating what I
am announcing. So the announcement is the launch of something I have been
working on in my spare time for a long time and what I believe will be a
logical next step in Internet development - ModBox an Open Platform as a
Service (OPaaS). Ok, what the #...@#$ is OPaaS? OPaaS is PaaS, but open. 
Think
Force.com/Google App Engine/Amazon EC2 - but open. Really open. Not fake
open like so much other BS services that try to lock you in. In a nutshell,
ModBox is a Web-based distributed development environment that is completely
neutral in every way. So, you can use any infrastructure you want, any
programming language, any server, any OS, any database, etc. to
create/distribute applications. Also, because ModBox works over standard
HTTP, you can incorporate existing applications or web services into the
applications you create. ModBox brings all the pieces together seemlessly
for programmers and users. I hope I have borrowed the best ideas from IDE's,
RAD, frameworks, Web services grid/cloud computing and Open Source to make a
logical ecosystem which puts a much needed front-end/face on all of it. This
list is the first place I have announced ModBox and I welcome you to Rock
the Box and let me know if it makes as much sense to you as it does to me. I
would, of course greatly appreciate any feedback as I am not so bold to
think I have cracked the code on the 1.0. The URL is below.

ModBox - Open Platform as a Service:
http://www.sullivansoftwaresystems.com/modbox

Thanks for your time.

Brian Sullivan
Sullivan Software Systems
ModBox - Rock the Box.


  You already posted this once...

  -- 
  Kyle Terry | www.kyleterry.com


  The first post was accidently posted within the PHP List Advice thread, not 
as a new post/thread as it should have been. That thread was to make sure it 
would be ok to post, this is the actual post :)  When I saw the orginal post 
was buried within the PHP List Advice thread, I realized I needed to post it 
as new thread. However, thanks for the heads up and if I am missing something, 
please let me know.

Re: [PHP] developers life

2009-01-20 Thread tedd

At 4:35 PM -0500 1/19/09, Robert Cummings wrote:

Are you an INTP?

http://www.personalitytest.net/cgi-bin/q.pl

(I don't know how good the test is, I picked one at random)

Cheers,
Rob.


I didn't pick at random, but rather what I thought -- my type: ENTJ

Interesting that the top related job position for this type is 
program designer.


Now, that doesn't make me a good one, it's just that's the way I 
lean. The test was not a bad assessment.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] developers life

2009-01-20 Thread Robert Cummings
On Tue, 2009-01-20 at 13:14 -0500, tedd wrote:
 At 4:35 PM -0500 1/19/09, Robert Cummings wrote:
 Are you an INTP?
 
 http://www.personalitytest.net/cgi-bin/q.pl
 
 (I don't know how good the test is, I picked one at random)
 
 Cheers,
 Rob.
 
 I didn't pick at random, but rather what I thought -- my type: ENTJ

I think you're confused... I picked the test at random, I've been INTP
since I first took the test 18 years ago (and every time since) :)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



[PHP] curl can't connect to my home server

2009-01-20 Thread Rene Veerman
Hi,

I've been stuck on this problem i'm having after i re-installed my linux
(debian) machine last month..

I'm building a CMS with video import capabilities, but since it runs on
shared hosting i need to make a cURL POST call to a URL on my home machine,
which does video-conversion.

This curl call has stopped working, curl_error() claiming couldn't connect
to host.

As a test, i'm simply calling up a url on my homeserver through curl.. The
url is http://82.170.249.144/mediaBeez/sn.php
The curl script is at http://veerman.ws/servagetest.php

Any light you can shed on this is very greatly appreciated.
I'm kinda stuck at a huge brick wall here..


Re: [PHP] developers life

2009-01-20 Thread Jason Pruim


On Jan 20, 2009, at 9:54 AM, Jason Pruim wrote:



On Jan 20, 2009, at 9:18 AM, Robert Cummings wrote:


On Tue, 2009-01-20 at 08:16 -0500, Jason Pruim wrote:

On Jan 19, 2009, at 10:12 PM, Paul M Foster wrote:


On Mon, Jan 19, 2009 at 10:23:49PM -, c...@l-i-e.com wrote:



ESTJ



Me too.


After answering 68 questions (All that displayed) it told me I  
didn't

answer them all... So if I want to go in rewrite the stupid thing so
that it works properly... What does that make me? :P


Silly for not hitting the back button.

:)


But alas... I did 3 times :P figured once wasn't enough... had to  
keep checking it :)


Well it finally worked for me... INFJ... Only 1% of the population  
like me! :P but apparently I should be a counselor rather then a  
programmer... Screw it I like programming :P



--
Jason Pruim
japr...@raoset.com
616.399.2355





[PHP] Re: curl can't connect to my home server

2009-01-20 Thread Rene Veerman
OOPS :)

As a second test, i changed the test-url to

http://82.170.249.144:81/mediaBeez/sn.phphttp://82.170.249.144/mediaBeez/sn.php

On Tue, Jan 20, 2009 at 7:33 PM, Rene Veerman rene7...@gmail.com wrote:

 Hi,

 I've been stuck on this problem i'm having after i re-installed my linux
 (debian) machine last month..

 I'm building a CMS with video import capabilities, but since it runs on
 shared hosting i need to make a cURL POST call to a URL on my home machine,
 which does video-conversion.

 This curl call has stopped working, curl_error() claiming couldn't connect
 to host.

 As a test, i'm simply calling up a url on my homeserver through curl.. The
 url is http://82.170.249.144/mediaBeez/sn.php
 The curl script is at http://veerman.ws/servagetest.php

 Any light you can shed on this is very greatly appreciated.
 I'm kinda stuck at a huge brick wall here..



Re: [PHP] curl can't connect to my home server

2009-01-20 Thread Eric Butera
On Tue, Jan 20, 2009 at 1:33 PM, Rene Veerman rene7...@gmail.com wrote:
 Hi,

 I've been stuck on this problem i'm having after i re-installed my linux
 (debian) machine last month..

 I'm building a CMS with video import capabilities, but since it runs on
 shared hosting i need to make a cURL POST call to a URL on my home machine,
 which does video-conversion.

 This curl call has stopped working, curl_error() claiming couldn't connect
 to host.

 As a test, i'm simply calling up a url on my homeserver through curl.. The
 url is http://82.170.249.144/mediaBeez/sn.php
 The curl script is at http://veerman.ws/servagetest.php

 Any light you can shed on this is very greatly appreciated.
 I'm kinda stuck at a huge brick wall here..


I just tried from the command line and it's timing out.  Check your os
firewall/router firewall?

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



[PHP] Re: curl can't connect to my home server

2009-01-20 Thread Rene Veerman
And FYI; the test-script i'm using is

?php
 session_write_close();
$ch = curl_init();
#set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, http://82.170.249.144/mediaBeez/sn.php;);
//curl_setopt($ch, CURLOPT_URL, http://www.google.de/;);
//curl_setopt($ch, CURLOPT_HEADER, );
curl_setopt($ch, CURLOPT_PORT, 81);
#grab URL and pass it to the browser
curl_exec($ch);
$error = curl_error($ch);

#close cURL resource, and free up system resources
curl_close($ch);
echo $error;
//phpinfo();
?

On Tue, Jan 20, 2009 at 7:35 PM, Rene Veerman rene7...@gmail.com wrote:

 OOPS :)

 As a second test, i changed the test-url to

 http://82.170.249.144:81/mediaBeez/sn.phphttp://82.170.249.144/mediaBeez/sn.php


 On Tue, Jan 20, 2009 at 7:33 PM, Rene Veerman rene7...@gmail.com wrote:

 Hi,

 I've been stuck on this problem i'm having after i re-installed my linux
 (debian) machine last month..

 I'm building a CMS with video import capabilities, but since it runs on
 shared hosting i need to make a cURL POST call to a URL on my home machine,
 which does video-conversion.

 This curl call has stopped working, curl_error() claiming couldn't
 connect to host.

 As a test, i'm simply calling up a url on my homeserver through curl.. The
 url is http://82.170.249.144/mediaBeez/sn.php
 The curl script is at http://veerman.ws/servagetest.php

 Any light you can shed on this is very greatly appreciated.
 I'm kinda stuck at a huge brick wall here..





Re: [PHP] maybe we could all?

2009-01-20 Thread Daniel Brown
On Mon, Jan 19, 2009 at 22:59, Kyle Terry k...@kyleterry.com wrote:

 I demand Dan and Nathan to go to bed now.

I consider Nathan a friend and talented programmer, but nothing
could make me interested in that way, Kyle.

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

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



Re: [PHP] Re: curl can't connect to my home server

2009-01-20 Thread Eric Butera
On Tue, Jan 20, 2009 at 1:35 PM, Rene Veerman rene7...@gmail.com wrote:
 OOPS :)

 As a second test, i changed the test-url to

 http://82.170.249.144:81/mediaBeez/sn.phphttp://82.170.249.144/mediaBeez/sn.php

 On Tue, Jan 20, 2009 at 7:33 PM, Rene Veerman rene7...@gmail.com wrote:

 Hi,

 I've been stuck on this problem i'm having after i re-installed my linux
 (debian) machine last month..

 I'm building a CMS with video import capabilities, but since it runs on
 shared hosting i need to make a cURL POST call to a URL on my home machine,
 which does video-conversion.

 This curl call has stopped working, curl_error() claiming couldn't connect
 to host.

 As a test, i'm simply calling up a url on my homeserver through curl.. The
 url is http://82.170.249.144/mediaBeez/sn.php
 The curl script is at http://veerman.ws/servagetest.php

 Any light you can shed on this is very greatly appreciated.
 I'm kinda stuck at a huge brick wall here..



$ curl -I http://82.170.249.144:81/mediaBeez/sn.php
HTTP/1.1 200 OK
Date: Tue, 20 Jan 2009 19:40:01 GMT
Server: Apache
X-Powered-By: PHP/5.2.0-8+etch13
Set-Cookie: PHPSESSID=b797765b2b77ffe1d51099e11ca680d8; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html; charset=UTF-8

Looks like that works.  But it's setting a session.  Unless you're
using cookie jars maybe that could be part of your problem.

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



[PHP] Re: ANNOUNCEMENT: ModBox - Open Platform as a Service

2009-01-20 Thread Shawn McKenzie
c...@wizzyweb.com wrote:
 After posting to this list to see if it is appropriate and getting good 
 feedback, I'm posting an announcement I think is very relative to this list 
 as I have been using PHP ever since it was a Perl script (PHP/FI) and have 
 been heavily influenced by it's concept and evolution when creating what I 
 am announcing. So the announcement is the launch of something I have been 
 working on in my spare time for a long time and what I believe will be a 
 logical next step in Internet development - ModBox an Open Platform as a 
 Service (OPaaS). Ok, what the #...@#$ is OPaaS? OPaaS is PaaS, but open. 
 Think 
 Force.com/Google App Engine/Amazon EC2 - but open. Really open. Not fake 
 open like so much other BS services that try to lock you in. In a nutshell, 
 ModBox is a Web-based distributed development environment that is completely 
 neutral in every way. So, you can use any infrastructure you want, any 
 programming language, any server, any OS, any database, etc. to 
 create/distribute applications. Also, because ModBox works over standard 
 HTTP, you can incorporate existing applications or web services into the 
 applications you create. ModBox brings all the pieces together seemlessly 
 for programmers and users. I hope I have borrowed the best ideas from IDE's, 
 RAD, frameworks, Web services grid/cloud computing and Open Source to make a 
 logical ecosystem which puts a much needed front-end/face on all of it. This 
 list is the first place I have announced ModBox and I welcome you to Rock 
 the Box and let me know if it makes as much sense to you as it does to me. I 
 would, of course greatly appreciate any feedback as I am not so bold to 
 think I have cracked the code on the 1.0. The URL is below.
 
 ModBox - Open Platform as a Service:
 http://www.sullivansoftwaresystems.com/modbox
 
 Thanks for your time.
 
 Brian Sullivan
 Sullivan Software Systems
 ModBox - Rock the Box.
 

I looked through the site and I don't get it.  Am I just a dumb ass
(well duh), or am I missing the point.  I'm not familiar with force.com etc.

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

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



Re: [PHP] curl can't connect to my home server

2009-01-20 Thread Jason Pruim


On Jan 20, 2009, at 1:33 PM, Rene Veerman wrote:


Hi,

I've been stuck on this problem i'm having after i re-installed my  
linux

(debian) machine last month..

I'm building a CMS with video import capabilities, but since it  
runs on
shared hosting i need to make a cURL POST call to a URL on my home  
machine,

which does video-conversion.

This curl call has stopped working, curl_error() claiming couldn't  
connect

to host.

As a test, i'm simply calling up a url on my homeserver through  
curl.. The

url is http://82.170.249.144/mediaBeez/sn.php
The curl script is at http://veerman.ws/servagetest.php

Any light you can shed on this is very greatly appreciated.
I'm kinda stuck at a huge brick wall here..




This might seem a little simplistic but... You say it's your home  
server... Do you either have a static IP or know for sure that that  
is your current IP?



--
Jason Pruim
japr...@raoset.com
616.399.2355





[PHP] Re: developers life

2009-01-20 Thread Frank Stanovcak

Nathan Rixham nrix...@gmail.com wrote in message 
news:32.be.60519.170f4...@pb1.pair.com...
 well just for the hell of it; and because I'm feeling worn..

 anybody else find the following true when you're a developer?

 - frequent bursts of side-tracking onto more interesting subjects
 - vast amount of inhuman focus, followed by inability to remain focussed
 - general tendancy to keep taking on projects, often for no good reason
 - inability to flip out of work mode at 5pm like the rest of the world
 -- [sub] not feeling normal unless worked you've extra; while other 
 professions demand overtime as little as an extra 15 minutes
 - constant learning (positive thing)
 - unlimited skill scope, if its on a computer you'll give it a go
 - amazing ability to prioritise (the wrong things)
 - all projects suddenly become uninteresting and all motivation is lost at 
 approx 65-85 percent completion
 - the code seems more important than the app (even though its not)
 - lots more but lost interest / focus

 ps:
 expectantly installed windows 7 over the weekend, brief moment of 
 excitement coupled with the thought i wonder what it's like; anticlimax 
 + reality check, it was just a taskbar, start menu and desktop.. you'd 
 think I'd know by now.

 regards :-)

 i so have more important things to do

I have this to say re:win 7
http://xkcd.com/528/ 



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



Re: [PHP] developers life

2009-01-20 Thread Frank Stanovcak

Robert Cummings rob...@interjinn.com wrote in message 
news:1232447313.30838.5.ca...@localhost...
 On Mon, 2009-01-19 at 22:06 +, Nathan Rixham wrote:
 Robert Cummings wrote:
  On Mon, 2009-01-19 at 21:53 +, Nathan Rixham wrote:
 
  Robert Cummings wrote:
 
  On Mon, 2009-01-19 at 21:28 +, Nathan Rixham wrote:
 
  well just for the hell of it; and because I'm feeling worn..
 
  anybody else find the following true when you're a developer?
 
  - frequent bursts of side-tracking onto more interesting subjects
  - vast amount of inhuman focus, followed by inability to remain 
  focussed
  - general tendancy to keep taking on projects, often for no good 
  reason
  - inability to flip out of work mode at 5pm like the rest of the 
  world
  -- [sub] not feeling normal unless worked you've extra; while other
  professions demand overtime as little as an extra 15 minutes
  - constant learning (positive thing)
  - unlimited skill scope, if its on a computer you'll give it a go
  - amazing ability to prioritise (the wrong things)
  - all projects suddenly become uninteresting and all motivation is 
  lost
  at approx 65-85 percent completion
  - the code seems more important than the app (even though its not)
  - lots more but lost interest / focus
 
  Are you an INTP?
 
  http://www.personalitytest.net/cgi-bin/q.pl
 
 
  thanks for that rob, but predicatably I've got to number 26 and 
  stopped
  - penetrating insight, lol
 
 
  Then your not INTP enough :) An INTP would want to know.
 
  Cheers,
  Rob.
 
 and finished in 3 sessions: Your personality type is INTP shock

 *lol* There ya go!

 Cheers,
 Rob.
 -- 
 http://www.interjinn.com
 Application and Templating Framework for PHP

huh...I ended up INFP

Frank --realizes he's not like the cool kids. 



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



Re: [PHP] Client/Server Printing

2009-01-20 Thread Philip Thompson

On Jan 20, 2009, at 9:16 AM, Paul M Foster wrote:


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


We've addressed this issue in two ways. Originally our application was  
locally hosted. The solution for us was:


?php
if ($windows) {
exec (psexec.exe -d -i -w . escapeshellarg($filepath) . -u  
$user -p . escapeshellcmd ($pass) .  -e gswin32c.exe -q -dNOPAUSE - 
dNOPROMPT -dQUIET -dBATCH -dNumCopies=$copies -sDEVICE=msinwpr2 - 
sOutputFile=\spool\\$printerShare\ \$pdfFilepath\ 21);

}
else {
exec (/usr/bin/lpr -# $copies -P .  
escapeshellarg($printerShare) . \$pdfFilepath\ 21);

}
?

The Windows version uses psexec to call ghostscript. So you do have to  
use third-party utilities for Windows (but they are small). However,  
if on *nix, then you can use the built in lpr. Of course, just put  
that code in a function that is called when clicked on a link to print.


http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
http://www.ghostscript.com/

Our online solution uses a third-party utility for printing  
(Cloverleaf/Secure Courier). Essentially we have a (print) server and  
each of our clients have a client-version that connects to the print  
server. In our application, we use sockets to send print jobs to the  
server. The server then divvies out the print jobs to the specific  
client id specified in the data sent through the socket. However,  
since all your servers/clients are local, the first option may be more  
realistic.


Hope that helps,

~Philip

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



Re: [PHP] Client/Server Printing

2009-01-20 Thread Török Alpár
2009/1/20 Paul M Foster pa...@quillandmouse.com

 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

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


You can use CSS for print media, and write the a different style sheet  for
the pages you want to print. You will have a page displayed with one  A.css
and you can have the browser automatically use B.css when print is
requested. No extra coding needed just the second css witch you link in the
header section of your html. The user only hits ctrl + P. You maight want to
place a note, that hey can print directly, and that, the print version will
look nice, they would probably expect it to print as is.

-- 
Torok, Alpar Istvan


Re: [PHP] developers life

2009-01-20 Thread tedd

At 1:25 PM -0500 1/20/09, Robert Cummings wrote:

On Tue, 2009-01-20 at 13:14 -0500, tedd wrote:
  I didn't pick at random, but rather what I thought -- my type: ENTJ

I think you're confused... I picked the test at random,


I've experienced a lot of that recently.

---


I've been INTP
since I first took the test 18 years ago (and every time since) :)


In the sixth grade I took an IQ test. When I was 36, I took another 
-- interestingly enough, both scores were identical.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] mysql_query and my.cnf?

2009-01-20 Thread Ashley Sheridan
On Tue, 2009-01-20 at 17:51 +0100, Jan G.B. wrote:
 2009/1/20 Waynn Lue waynn...@gmail.com:
  Hey guys,
 
  I've been noticing that large queries cause a connection lost to mysql
  server problem, so I'm trying to figure out what settings I need to tweak in
  my my.cnf file to get it to work.
 
 Have you had a look on your (mysql) Logfiles and/or are you echo'ing
 mysql_error() or $dbhandle-error in case of mysqli?
 I guess there must be a hint for the reason of the connection lost.
 
  I know people change the
  max-allowed-packet variable, but I'm trying to figure out what the correct
  section of the my.cnf is.  Is it just [mysql]?
 
 Try that.
 http://tinyurl.com/9x3gws
 
 Regards
 
I think there's a setting in the php.ini that lets you define how many
simultaneous connections it can make with mysql. the mysql directives
are towards the bottom of the ini file, so check them out and see if
tweaking a few of them fixes things?


Ash
www.ashleysheridan.co.uk


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



[PHP] Re: Client/Server Printing

2009-01-20 Thread Frank Stanovcak
Paul M Foster pa...@quillandmouse.com wrote in message
news:20090120151606.gu18...@quillandmouse.com...
 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








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



[PHP] RE: Installation problems on Vista

2009-01-20 Thread lucson pierre-charles

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 + From: nrix...@gmail.com To: 
lucsonpie...@hotmail.com CC: php-general@lists.php.net 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 :)

[PHP] Re: Installation problems on Vista

2009-01-20 Thread Nathan Rixham

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



RE: [PHP] Installation problems on Vista

2009-01-20 Thread lucson pierre-charles

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: tg-...@gryffyndevelopment.com To: lucsonpie...@hotmail.com; 
php-general@lists.php.net 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 
lucsonpie...@hotmail.com To: php-general@lists.php.net Date: Mon, 19 Jan 
2009 22:37:25 + 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 

[PHP] Curl fiel Upload

2009-01-20 Thread Matthias Laug
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


RE: [PHP] Re: Installation problems on Vista

2009-01-20 Thread lucson pierre-charles

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 + From: nrix...@gmail.com To: 
lucsonpie...@hotmail.com CC: php-general@lists.php.net 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:/php5remove the #'s  
 --  PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php 

[PHP] Re: Installation problems on Vista

2009-01-20 Thread Shawn McKenzie
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

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



Re: [PHP] Re: Installation problems on Vista

2009-01-20 Thread Nathan Rixham

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?

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



Re: [PHP] Re: Installation problems on Vista

2009-01-20 Thread Shawn McKenzie
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 + From: nrix...@gmail.com To: 
 lucsonpie...@hotmail.com CC: php-general@lists.php.net 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:/php5remove 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



RE: [PHP] Re: Installation problems on Vista

2009-01-20 Thread lucson pierre-charles

Yes. It can't find a file. To: php-general@lists.php.net Date: Tue, 20 Jan 
2009 17:14:14 -0600 From: nos...@mckenzies.net 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 + From: 
nrix...@gmail.com To: lucsonpie...@hotmail.com CC: php-general@lists.php.net 
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:/php5remove 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 

Re: [PHP] Re: Installation problems on Vista

2009-01-20 Thread Shawn McKenzie
lucson pierre-charles wrote:
 Yes. It can't find a file. To: php-general@lists.php.net Date: Tue, 20 Jan 
 2009 17:14:14 -0600 From: nos...@mckenzies.net 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 + From: 
 nrix...@gmail.com To: lucsonpie...@hotmail.com CC: 
 php-general@lists.php.net 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:/php5remove 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

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



[PHP] Re: Curl fiel Upload

2009-01-20 Thread Manuel Lemos
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/

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



[PHP] Re: Client/Server Printing

2009-01-20 Thread Tony Marston

Paul M Foster pa...@quillandmouse.com wrote in message 
news:20090120151606.gu18...@quillandmouse.com...
 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 



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