php-general Digest 2 Apr 2010 06:56:23 -0000 Issue 6671

2010-04-01 Thread php-general-digest-help

php-general Digest 2 Apr 2010 06:56:23 - Issue 6671

Topics (messages 303726 through 303748):

Re: How to know which PHP is used by Apache
303726 by: Nilesh Govindarajan
303728 by: Kevin Kinsey
303730 by: Nilesh Govindarajan
303731 by: Kevin Kinsey
303732 by: Nilesh Govindarajan
303748 by: Devendra Jadhav

Re: php 5.3.2 Unable to fork
303727 by: Eduardo Nunes
303729 by: Eduardo Nunes

File encryption under PHP
303733 by: Paul M Foster
303734 by: Ashley Sheridan
303735 by: Paul M Foster
303736 by: APseudoUtopia
303737 by: Ashley Sheridan
303738 by: APseudoUtopia
303739 by: Kevin Kinsey
303744 by: Adam Richardson

Tokutek Acquires Oracle
303740 by: Daevid Vincent
303741 by: Nathan Rixham
303742 by: Ashley Sheridan
303743 by: Tommy Pham

Apache rule/directive to stop serving PHP pages from /var/www/includes/
303745 by: Daevid Vincent
303746 by: Robert Cummings

Re: Apache rule/directive to stop serving PHP pages from /var/www/includes/ 
[SOLVED]
303747 by: Daevid Vincent

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
--- Begin Message ---

On 04/01/10 20:30, Devendra Jadhav wrote:

On Thu, Apr 1, 2010 at 7:22 PM, Devendra Jadhavwrote:


On Thu, Apr 1, 2010 at 7:13 PM, Teus Benschopwrote:


On Thu, 2010-04-01 at 19:07 +0530, Devendra Jadhav wrote:

With my case both installation of PHP has version 5.x, so how to know

which

PHP is being used?


Running this page through Apache could do it:



Teus.


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



I am still confused. As per Nilesh php's binary is not required and as per
Ashley it is required.
Which one is correct?
And I am not able to find which php's binary is used by using phpinfo().




--
Devendra Jadhav
देवेंद्र जाधव



Anyone confident about either of the two answers?




Well, you can do a trial test. Compile a different version of php 
without libphp5.so, and replace the php interpreter of libphp5.so with 
this one.


If phpinfo() from apache shows you a different version then libphp5 uses 
the binary else not.


As per common logic, libphp5 embeds the php interpreter into apache, 
hence it'd not make sense to say that it needs the binary.


--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !
--- End Message ---
--- Begin Message ---

Devendra Jadhav wrote:



I am still confused. As per Nilesh php's binary is not required and as per
Ashley it is required.
Which one is correct?
And I am not able to find which php's binary is used by using phpinfo().


Anyone confident about either of the two answers?


Pretty confident about all of them.  Nilesh probably misunderstood,
or we are misunderstanding him.  PHP has to have a binary file,
whether it's the CLI interpreter or the Apache "module".

Run a script with phpinfo() in it.  Look for the line that says
"Server API".  If this reads something like "Apache $N.$N Handler",
then the PHP interpreter binary is something like "libphp$n.so".
If the line reads "Command Line Interface", then you are using
something like /usr/bin/php, /usr/local/bin/php, etc. (I'm from
a BSD background, your $penguin_path may vary).

If you are talking about actually having two different versions
of PHP installed, and not sure which is actually being called,
you might find out something with the Linux equivalent of the
BSD `pkg_which`:

[31] Thu 01.Apr.2010 10:39:24
[ad...@archangel][/usr/local/bin]
sudo pkg_which /usr/local/bin/php
php5-5.2.11

This command is highly dependent on your Linux distro:  on
RH I think it's "rpm", "dpkg" on Debian, "urpmf" on Mandriva,
etc.

If you have two installations of the same version, $deity
help you :-)

HTH,

Kevin Kinsey
--- End Message ---
--- Begin Message ---

libphp5.so doesn't need the php binary.

I've confirmed this using a test.

My local apache is configured to use libphp5.so

I moved /usr/bin/php to /root, then started apache and ran drupal. It 
worked.


This confirms that libphp5.so is independent of the php binary in 
/usr/bin as I suggested earlier.


--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !
--- End Message ---
--- Begin Message ---

Nilesh Govindarajan wrote:

libphp5.so doesn't need the php binary.


You're right, and of course not.  libphp5.so
*is* a "PHP binary"  :-)


I've confirmed this using a test.

My local apache is configured to use libphp5.so

I moved /usr/bin/php to /root, then started apache and ran drupal. It 
worked.


Th

php-general Digest 1 Apr 2010 15:00:23 -0000 Issue 6670

2010-04-01 Thread php-general-digest-help

php-general Digest 1 Apr 2010 15:00:23 - Issue 6670

Topics (messages 303714 through 303725):

Re: Still searching for a bugtracking system
303714 by: Jan G.B.

image upload keeps file name ?
303715 by: Matthew Croud
303716 by: Ashley Sheridan
303717 by: Midhun Girish

How to know which PHP is used by Apache
303718 by: Devendra Jadhav
303719 by: Ashley Sheridan
303720 by: Devendra Jadhav
303721 by: Richard
303722 by: Nilesh Govindarajan
303723 by: Teus Benschop
303724 by: Devendra Jadhav
303725 by: Devendra Jadhav

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
--- Begin Message ---
2010/3/30 Andre Polykanine :
> Hello Jan,
>
> And what do you use then?)
>

Sadly, I'm bound to use what I dislike. Mantis. ;)
It's not my decision and in our business model there's no major
benefit in switching the software, at this point.
I can live with it.

Regards

> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
> jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: m_elensule
>
> - Original message -
> From: Jan G.B. 
> To: Alex Major 
> Date: Tuesday, March 30, 2010, 6:04:20 PM
> Subject: [PHP] Still searching for a bugtracking system
>
> 2010/3/30 Alex Major 
>>
>> Surely if it's not suitable for your situation, it's not the best? :)
>>
>> Mantis is what I'd recommend and believe has already been recommend to you.
>> Runs using PHP and MySQL, it's flexible for public or private projects,
>> multiple projects etc.
>>
>> I do agree with you that Bugzilla seems heavy, I know it has its supporters
>> but I've always found it to be overkill for the projects I've worked on.
>>
>> Alex.
>>
>> -Original Message-
>> From: Andre Polykanine [mailto:an...@oire.org]
>> Sent: 30 March 2010 14:14
>> To: php-gene...@lists.php.net
>> Subject: [PHP] Still searching for a bugtracking system
>>
>> Hello everyone,
>> The best of all suggested bugtrackers is JotBug, on my opinion. But it
>> works only with SQLite databases, and I have no access to such one
>> (only MySql).
>> Any solutions?
>> P.S. I'd use Trac, but since I have no own server yet, we have no
>> access to Python, either... Only Php, MySql, Perl.
>> I have looked at Bugzilla... seems to heavy for our service).
>>
>> -
>
> Well. I'm not a fan of mantis. Mantis has some annoying bugs and the
> codebase seems weird.
> It basically works, but that is all about it.
>
>
> I quote http://sqlite.org/about.html :
>
>> SQLite is a software library that implements 
>>a self-contained,serverless, zero-configuration, transactional SQL database 
>>engine.
> ...
>> Unlike most other SQL databases, SQLite does not have a separate server 
>> process. SQLite reads and writes directly to ordinary disk files. A complete 
>> SQL database with multiple tables, indices, triggers, and views, is 
>> contained in a single disk file.
>
> So you don't need "access" to such a database.
>
>
> Regards
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---

Hi Guys,

Can someone confirm for me that the code below will move an uploaded  
file and give it the same name as the original image file name ?



$file_dir = "/home/uploads";
foreach($_FILES as $file_name => $file_array) {
echo "path: ".$file_array["tmp_name"]."\n";
echo "name: ".$file_array["name"]."\n";
echo "type: ".$file_array["type"]."\n";
echo "size: ".$file_array["size"]."\n";

$UploadName[$num] = $file_array["name"];
$num++;

if (is_uploaded_file($file_array["tmp_name"])) {
		move_uploaded_file($file_array["tmp_name"], "$file_dir/". 
$file_array["name"]) or die ("Couldn't copy");

echo "file was moved!";
}
}



Many thanks,




--- End Message ---
--- Begin Message ---
On Thu, 2010-04-01 at 10:51 +0100, Matthew Croud wrote:

> Hi Guys,
> 
> Can someone confirm for me that the code below will move an uploaded  
> file and give it the same name as the original image file name ?
> 
> 
> $file_dir = "/home/uploads";
> foreach($_FILES as $file_name => $file_array) {
>   echo "path: ".$file_array["tmp_name"]."\n";
>   echo "name: ".$file_array["name"]."\n";
>   echo "type: ".$file_array["type"]."\n";
>   echo "size: ".$file_array["size"]."\n";
>   
>   $UploadName[$num] = $file_array["name"];
>  $num++;
> 
>   if (is_uploaded_file($file_array["tmp_name"])) {
>   move_uploaded_file($file_array["tmp_name"], "$file_dir/". 
> $file_array["