php-general Digest 22 Feb 2007 04:54:37 -0000 Issue 4639
Topics (messages 249196 through 249208):
reversing utf-8 string
249196 by: James Tu
Re: how can I find out if I have mcrypt and mhash installed?
249197 by: Eric Butera
249201 by: Jürgen Wind
249202 by: Jürgen Wind
Zend question
249198 by: Brian Dunning
Re: Storing compiled code on the server
249199 by: Andrei Verovski (aka MacGuru)
249203 by: Jürgen Wind
Re: New Menu Bar - Can people test it for me?
249200 by: Stut
249205 by: Jim Lucas
DOM Element default ID attribute
249204 by: Eli
Re: How to call image from mySql to php file
249206 by: Haydar TUNA
249207 by: Haydar TUNA
Re: Catch STDERR
249208 by: Peter Lauri
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
There doesn't seem to be a multibyte equivalent of strrev().
Is there an easy way to reverse the order of "characters" in a string
w/o traversing the "characters" backwards and creating a new string
by concatenating the "characters"?
-James
--- End Message ---
--- Begin Message ---
On 2/21/07, Ross <[EMAIL PROTECTED]> wrote:
Thought it would be in the phpinfo() but cannot find it.
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If it is compiled in then you should see it in phpinfo. I looked at
mine and saw a header for mcrypt and mhash.
--- End Message ---
--- Begin Message ---
Ross Hulford wrote:
>
> Thought it would be in the phpinfo() but cannot find it.
>
>
> R.
>
>
>
>
<?php
echo 'mcrypt is ';
if(!function_exists('mcrypt_encrypt')) echo '*NOT* ';
echo 'available';
?>
J.
--
View this message in context:
http://www.nabble.com/how-can-I-find-out-if-I-have-mcrypt-and-mhash-installed--tf3266193.html#a9088770
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Jürgen Wind wrote:
>
>
>
> Ross Hulford wrote:
>>
>> Thought it would be in the phpinfo() but cannot find it.
>>
>>
>> R.
>>
>>
>>
>>
> <?php
> echo 'mcrypt is ';
> if(!function_exists('mcrypt_encrypt')) echo '*NOT* ';
> echo 'available';
> ?>
>
> J.
>
... but if you intend to activate it :
remove the semicolon infront of
extension=php_mcrypt.[dll | so]
in your php.ini and restart your webserver
--
View this message in context:
http://www.nabble.com/how-can-I-find-out-if-I-have-mcrypt-and-mhash-installed--tf3266193.html#a9088894
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
I have eAccelerator on my server. I want to use Zend Guard. Anyone
know if I'll need to lose eAccelerator and switch to Zend Optimizer?
--- End Message ---
--- Begin Message ---
On Wednesday 21 February 2007 16:52:40 Brian Dunning wrote:
> I have a few scripts that I want to protect from the prying eyes of
> even people with root access to my server. The best suggestion I've
> heard is to store only the compiled version on the server itself. I
> have no idea how to do this or how those scripts would be called. Can
> anyone point me to a good starting place?
Just use PHP Accelerator (formely Turck MM Cache). Search for it on
sourceforge.net
--- End Message ---
--- Begin Message ---
Andrei Verovski (aka MacGuru) wrote:
>
> On Wednesday 21 February 2007 16:52:40 Brian Dunning wrote:
>> I have a few scripts that I want to protect from the prying eyes of
>> even people with root access to my server. The best suggestion I've
>> heard is to store only the compiled version on the server itself. I
>> have no idea how to do this or how those scripts would be called. Can
>> anyone point me to a good starting place?
>
> Just use PHP Accelerator (formely Turck MM Cache). Search for it on
> sourceforge.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
maybe you mean http://eaccelerator.net/ ?
--
View this message in context:
http://www.nabble.com/Storing-compiled-code-on-the-server-tf3267158.html#a9089013
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Scott Gunn wrote:
http://www.thebigspider.co.uk/test/menu.html
While I'm sure you're aware of this, I think it's worth pointing out.
You are breaching the copyright of a very litigiously trigger-happy
company with this. Unless you have their permission to use this layout
and the graphics you might want to reconsider.
-Stut
--- End Message ---
--- Begin Message ---
Scott Gunn wrote:
All,
http://www.thebigspider.co.uk/test/menu.html
I'm going to write some php code which will build this menu from an XML
file.
Before I do, I want to know what sort of browser compatibility it has? could
you guys test it and let me know if it worked ok and looked like the preview
picture?
If your on IE7 or Firefox2 and it works please don't email back as I know
these work fine.
Best Regards
Scott.
XP/NS8.1.2 You have some padding issues. The logo? image in the upper
left moves a little when you browse over the general link, but then
straightens out once you move off. Looks like a hover/padding issue.
XP/IE6 The font is wrong for all text, it uses browser default instead
of specified. Also, the initial layer menus General, Customers, and
Account do not work.
XP/FF 1.5.0.9 Works
XP/FF 2.0.0.1 Works
XP/Opera 9.10 Under the Account menu, the content is aligned to the
right, but in all other browsers it is left aligned. The second layer
menu with Blah Blah #1... etc is aligned to the right side of the icon
to the parent left edge, instead of the left side of icon, like the rest
of the browsers.
--
Enjoy,
Jim Lucas
Different eyes see different things. Different hearts beat on different
strings. But there are times for you and me when all such things agree.
- Rush
--- End Message ---
--- Begin Message ---
Hi,
I want to declare a default ID attribute to all elements in the document.
For example: If an element got the attribute 'id' then I want it
automatically to become the ID attribute of the element.
How can I do that?
-thanks!
--- End Message ---
--- Begin Message ---
Hello,
Firstly, your image table field should be BLOB field then you create
a image file (for example image.php). in this file, if your application is
more secure, you can control the session variables. You get key column of
your BLOB table (for example id, studentnumber and so on) with session
variables, GET variables or any way. I always get this column with SESSION
variables because it is more secure. After this, for get variables you can
call the image to your main application from image.php file with like the
following HTML1 code. for session variables you can call the image to your
main application from image.php file with like the following HTML2 code.
HTML 1 Code - for get variables
<img src="image.php?id=1923">
HTML 2 Code - for session variables
<img src="image.php">
image.php
<?php
session_start();
if (!session_is_registered ('username'))
{
include('hack.inc.php');
exit;
}
$id=$_SESSION["id"]; //for session variables
$hostname="host.haydartuna.net";
$username="username";
$password="xxxxx";
$database="myapplication";
@ $db=mssql_pconnect ($hostname, $username,$password)
or die ('Error');
mssql_select_db($database);
$sql="select picture from table where id='$id' ";
$result=mssql_query($sql);
$row=mssql_fetch_assoc($result);
echo($row['resim']);
?>
--
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net
"Chris Carter" <[EMAIL PROTECTED]>, haber iletisinde sunlari
yazdi:[EMAIL PROTECTED]
>
> I have a field in database called "logos" which has one value
> "images/logos/some_logo.jpg"
>
> In my php I am trying to call it in my php file as image. With this code.
>
> $sno = $_REQUEST['sno'];
>
> $query="SELECT logos FROM table WHERE sno = '$sno'";
>
> $result=mysql_query($query);
> $num=mysql_numrows($result);
>
> mysql_close();
> $logos=mysql_result($result,$i,"logos");
>
> echo "
> <div>
> <p> $logos </p>
> </div>";
>
> ?></div>
>
> But getting errors. What is the way to call image in php file from the
> database. I know that this is a very basic question but first time for me.
> I
> ignored this in the begining but now its right infront of me.
>
> Please advice.
>
> --
> View this message in context:
> http://www.nabble.com/How-to-call-image-from-mySql-to-php-file-tf3267012.html#a9081704
> Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Hello again,
I make a mistake in the image.php code at echo($row['resim']);
line. if you change this line echo($row['picture']) , your problem will be
fixed. :))))
I have written table field in Turkish. in Turkish picture means that resim
:)))))
--
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net
"Chris Carter" <[EMAIL PROTECTED]>, haber iletisinde sunlari
yazdi:[EMAIL PROTECTED]
>
> I have a field in database called "logos" which has one value
> "images/logos/some_logo.jpg"
>
> In my php I am trying to call it in my php file as image. With this code.
>
> $sno = $_REQUEST['sno'];
>
> $query="SELECT logos FROM table WHERE sno = '$sno'";
>
> $result=mysql_query($query);
> $num=mysql_numrows($result);
>
> mysql_close();
> $logos=mysql_result($result,$i,"logos");
>
> echo "
> <div>
> <p> $logos </p>
> </div>";
>
> ?></div>
>
> But getting errors. What is the way to call image in php file from the
> database. I know that this is a very basic question but first time for me.
> I
> ignored this in the begining but now its right infront of me.
>
> Please advice.
>
> --
> View this message in context:
> http://www.nabble.com/How-to-call-image-from-mySql-to-php-file-tf3267012.html#a9081704
> Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Hi Steve,
Yes that would be an option. But then I need to put the username and
password (alternativly ssh2_auth_hostbased_file). Hrm, will think about it
for a while. I might try it out.
My speed requirements aren't really restricted as it is run on a local
network and no dense traffic.
I will either use this or redirect STDERR to a file and read it from there.
Best regards,
Best regards,
Peter Lauri
www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free
-----Original Message-----
From: steve [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 21, 2007 7:17 AM
To: Peter Lauri
Cc: [EMAIL PROTECTED]; [email protected]
Subject: Re: [PHP] Catch STDERR
What are your speed requirements? You can use the ssh functions can
ssh2_exec into yourself. You can get the error stream separately
then...
After the connection is open, it is basically as fast as exec. But
there is a hit on connection. I wouldn't use this in webpage
environment, but I do use it for CLI admin applications. I use it to
run a stream of commands to many servers simultaneously.
On 2/20/07, Peter Lauri <[EMAIL PROTECTED]> wrote:
> [snip]
>
> Do you need STDERR to go "out" to, err, wherever it goes, *AND* get it
> into your PHP script?
>
> Perhaps 'tee' (man tee) would let you do that.
>
> Or do you just need STDOUT in one variable, and STDERR in another,
> both in PHP?
>
> I think you could do something in shell to re-bind STDOUT to some
> other file/pipe, and then run your cool command...
>
> $tmpfile = tmpfile(); //I always get this one wrong.
> exec("rebind 2 $tmpfile; some cool command', $output, $error);
> $stderr = file_get_contents($tmpfile);
>
> It's probably not called 'rebind' but I know it's some shell command
> that does this.
>
> Possibly shell-specific, so you may even need to wrap the whole thing
> in a 'bash' call.
>
> Another option is to try to write a .sh shell script to get what you
> want for STDOUT to go where you want, and THEN just call that script
> (which has 'some cool command' at the end) from PHP, and let the
> weird-o shell stuff be done in a shell script, and not clutter up your
> PHP code with a complex shell script setup/tear-down.
>
> [/snip]
>
> I'd like to get STDERR into one variable in PHP and STDOUT into one. This
so
> that when we execute a script and there is an exit code different from 0 I
> want to show a log of error/notices during the script. Actually I want to
> show the whole process if it fails so 2>&1 for exit code not equal to 0.
>
> I'll probably end up writing a patch for exec now :)
>
> /Peter
>
> www.dwsasia.com
> www.lauri.se
> www.carbon-free.org.uk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---