php-general Digest 26 Jan 2002 13:48:07 -0000 Issue 1134

Topics (messages 82186 through 82210):

Re: upgrade problem
        82186 by: Alan McFarlane

Re: HELP! with PHP extension <<
        82187 by: Alan McFarlane

Re: Printing JPEG images generated with ImageJPEG with IE/WIN
        82188 by: David_Bourne

Re: PHP IDE
        82189 by: Zeev Suraski

Encryption
        82190 by: Anas Mughal
        82203 by: Alan McFarlane

Problem in mysql connection
        82191 by: Uma Shankari T.
        82192 by: Jeff Sheltren
        82204 by: Uma Shankari T.
        82205 by: Alan McFarlane

Passing objects
        82193 by: Dean Householder
        82194 by: Jason Wong
        82198 by: Dean Householder
        82199 by: Jeff Sheltren

I'm not sure how to do some simple code...
        82195 by: Leif K-Brooks
        82200 by: Mike Maltese
        82201 by: Mike Maltese

Re: move_uploaded_file() query
        82196 by: Jason Wong

Re: strings and \n
        82197 by: Jason Wong

regex
        82202 by: Yamin Prabudy

Sending Files to a Remote User
        82206 by: [ rswfire ]

Re: set_time_limit() in a loop
        82207 by: Paul Roberts

Re: Outreaching (bug fix)
        82208 by: Bogdan Stancescu

get image from blob in mysql
        82209 by: Rodrigo Peres
        82210 by: Mike Frazer

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 ---
It sounds like an inconsisteny in the library versions. Try and get the
latetst version of the GD library, (source if necessary), or if you have a
tool that is capable of analyzing .so/.dll dependancies, use that.

Chuck Barnett <[EMAIL PROTECTED]> wrote in message
002301c1a607$c3dff1e0$[EMAIL PROTECTED]">news:002301c1a607$c3dff1e0$[EMAIL PROTECTED]...
> Hi, I have been running 4.0.3 or so and I was upgrading to 4.1.1.
>
> I also upgraded gdlib to 1.8.4.  I compiled php with jpeg support and gd
> support
>
> everything made and compiled ok.
>
> when I restart apache I get this:
>
> Setting up Web Service: Syntax error on line 58 of
> /etc/httpd/conf/httpd.conf:
> Cannot load /etc/httpd/modules/libphp4.so into server:
> /etc/httpd/modules/libphp4.so: undefined symbol: gdImageCreateFromGif
>
> to get apache running again I have to copy my backup libphp4.so.
>
> I know it probably has something to do with an older version of gdlib but
> I'm not sure.
>
> My box is a Cobalt RAQ4.  If anyone has any ideas please help :)
>
> Thanks,
> Chuck
>
>
>
>


--- End Message ---
--- Begin Message ---
Make sure you've copied the contents of the c:\php\dlls folder to your
system directory (\windows\system, \winnt\system32, not sure 'bout 2K).

Your extension_dir setting in php.ini should be

extension_dir = c:/php/extensions/

And make sure you've copied your php.ini to your windows directory
(\windows, \winnt, again not sure 'bout 2K)

Andre Amaral <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> Here is the situation.
>
> I have Windows 2000 SP2, IIS5 running PHP 4.1.1 using CGI.
>
> My PHP folder is C:\php
> Extension Folder is: C:\php\extension
> PHP.INI file: extention_dir = "C:\php\extension\"
>
> First problem that I have is loading extensions. Every time I try to
> uncomment an extension on PHP.INI I get the following message after
restart
> IIS.
>
> [Unable to load dynamic library 'C:\php\extension\php_db.dll' - The
> specified procedure could not be found]
>
> I also want to mention that I tried the follwing in PHP.INI...
>
> extention_dir = ".;C:\php\extension\"
> extention_dir = ",;C:\php\extension\"
> extention_dir = "C:/php/extension/"
>
> Obs.: All DLL's the came with the original package are there.
>
> Second problem is that every single script I execute in my server it gives
> me the following error...
>
> [PHP Warning: Undefined property: blabla in c:\blabla\blabla]
>
> Obs.: The 'blablabla' is representing the propperty and the folder
>
> Thank you guys. I hope I get some good help. I need it really bad. I've
been
> burning my brain on this for the past 2 weeks.
>
>
>
>
>
>
>
>


--- End Message ---
--- Begin Message ---
>To: [EMAIL PROTECTED]
>Message-ID: <[EMAIL PROTECTED]>
>Date: Fri, 25 Jan 2002 16:20:57 +0100
>From: Martin Thoma <[EMAIL PROTECTED]>
>MIME-Version: 1.0
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>Subject: Re: Printing JPEG images generated with ImageJPEG with IE/WIN
>
>Hm, it could be that IE tries to reload the picture (which isn't there
>anymore because the form-data has been expired). Perhaps saving the
>picture temporarly on the server will prevent the problem.
>

That could be what is happening. I'm generating data for students to 
analyze on one page with the hidden form and generating a graph of 
the data with the next page. The only thing generated is the image. 
If I date/time stamp the image file I could serve that up on the next 
page...it would be good to get the right graph to the right student. 
Might be worth a try.

Curious that it works with Mac IE and Win Netscape but not Win IE.

David
-- 
David Bourne
OUHSC College of Pharmacy
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I'm probably not objective, but the upcoming (Feb 4) Zend Studio is pretty
darned good, and it works perfectly under Linux.  You can try the beta
(even though final release will have much more impressive/intelligent code
completion) at zend.com/store/beta.php

Zeev

On Fri, 25 Jan 2002, Rafael Perazzo B Mota wrote:

> Who knows a good Php IDE for linux, like PHP Code ? 
> 
> Rafael Perazzo 
> 
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> 

-- 
Zeev Suraski <[EMAIL PROTECTED]>
http://www.zend.com/

--- End Message ---
--- Begin Message ---
I am totally new to encryption.
My question is very simple.
If I use the mcrypt module to encrypt and decrypt some
data, would it guarantee to work consistently with
future versions of the mcryp module (or PHP versions).

(i.e. Would decription always give me the same
result?)

Thanks.


=====
Anas Mughal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Tel: 973-249-6665

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com
--- End Message ---
--- Begin Message ---
As far as I'm aware, as long as you use the same seed or salt value,
encrypting material will always yield the same results. However, remember
that not all servers have support for mcrypt... You may find it better to
use something simpler like md5($seed . $data), where $seed is a unique (and
hireable) value that you have created.


Anas Mughal <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am totally new to encryption.
> My question is very simple.
> If I use the mcrypt module to encrypt and decrypt some
> data, would it guarantee to work consistently with
> future versions of the mcryp module (or PHP versions).
>
> (i.e. Would decription always give me the same
> result?)
>
> Thanks.
>
>
> =====
> Anas Mughal
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> Tel: 973-249-6665
>
> __________________________________________________
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions!
> http://auctions.yahoo.com


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



Hello,

    I have installed php4 rpm in my machine.while connecting php with
mysql it is giving fatal error.I have given like this

mysql_connect("$servername","$username","$password");

Why it is so ..

Is there any other files i have to install to access the database??????



Regards,
Uma

--- End Message ---
--- Begin Message ---
What was the error message given?  Are you sure that mysql is running and
working properly?

Jeff

> Hello,
>
>     I have installed php4 rpm in my machine.while connecting php with
> mysql it is giving fatal error.I have given like this
>
> mysql_connect("$servername","$username","$password");
>
> Why it is so ..
>
> Is there any other files i have to install to access the database??????


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



Hello,

    I have installed php4 rpm in my machine.while connecting php with
mysql it is giving fatal error.I have given like this

mysql_connect("$servername","$username","$password");

Why it is so ..

Is there any other files i have to install to access the database??????



Regards,
Uma


--- End Message ---
--- Begin Message ---
What is the error message? (It will help us a lot <G>)



Uma Shankari T. <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
>
> Hello,
>
>     I have installed php4 rpm in my machine.while connecting php with
> mysql it is giving fatal error.I have given like this
>
> mysql_connect("$servername","$username","$password");
>
> Why it is so ..
>
> Is there any other files i have to install to access the database??????
>
>
>
> Regards,
> Uma
>
>


--- End Message ---
--- Begin Message ---
How can you pass an object from one page to another?  Is there any convenient way to 
do it with PHP?

Dean
--- End Message ---
--- Begin Message ---
On Saturday 26 January 2002 11:51, Dean Householder wrote:
> How can you pass an object from one page to another?  Is there any
> convenient way to do it with PHP?

Yes, use sessions. See chapter on "Session handling functions".


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Mum's the word.
                -- Miguel de Cervantes
*/
--- End Message ---
--- Begin Message ---
I'm pretty new to PHP.  If anyone can elaborate a little on this I would
appreciate it greatly.

Thanks

--- End Message ---
--- Begin Message ---
Well, PHP has 'sessions' which allow you to do just what you are asking,
pass variables between multiple pages.  Sessions are somewhat like cookies,
but all data is stored on the server instead of the client, so you don't
have to rely on the user to accept your cookie.

Here's a short intro/tutorial that may help you out:
http://www.devshed.com/Server_Side/PHP/Sessions/page1.html

Jeff

> I'm pretty new to PHP.  If anyone can elaborate a little on this I would
> appreciate it greatly.
>
> Thanks
>
>


--- End Message ---
--- Begin Message ---
I know this is probably a stupid question, but how do I make it so that if a
string contains the word "script" (I'm banning javascript) it does
something? 
--- End Message ---
--- Begin Message ---

$mystring = "This is a string with the word script in it";

if(eregi("script",$mystring){
    //do something here
}


----- Original Message -----
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 25, 2002 8:12 PM
Subject: [PHP] I'm not sure how to do some simple code...


> I know this is probably a stupid question, but how do I make it so that if
a
> string contains the word "script" (I'm banning javascript) it does
> something?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


--- End Message ---
--- Begin Message ---
Whoops, that should be:

$mystring = "This is a string with the word script in it";

 if(eregi("script",$mystring)){
     //do something here
}

----- Original Message -----
From: "Mike Maltese" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 25, 2002 8:41 PM
Subject: Re: [PHP] I'm not sure how to do some simple code...


>

> }
>
>
> ----- Original Message -----
> From: "Leif K-Brooks" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 25, 2002 8:12 PM
> Subject: [PHP] I'm not sure how to do some simple code...
>
>
> > I know this is probably a stupid question, but how do I make it so that
if
> a
> > string contains the word "script" (I'm banning javascript) it does
> > something?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


--- End Message ---
--- Begin Message ---
On Saturday 26 January 2002 05:45, will hives wrote:


> No I don't have a procedure to retrieve the new file name that's what I am
> looking to do. I don't know how to write that new name into the database.

You really need to learn to read the fine manual - chapter on "Handling file 
uploads".

"Give a man a fish and you feed him for a day. Teach a man to fish and he 
feeds himself for the rest of his life. Or something like that."


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
"Everyone's head is a cheap movie show."
-- Jeff G. Bone
*/
--- End Message ---
--- Begin Message ---
On Saturday 26 January 2002 04:48, Greg Sidelinger wrote:
> Ok I'm having a problem with the new line char \n in strings.  I'm
> trying to contrast an email that gets sent with the mail() function.
> Here is what I'm doing.
>
> $message = "line1\n";
> $message .= "line2\n\n";
> $message .= "line3\n";
> ...
> $message = "lne99";

Is this a typo in your message or in your code? Shouldn't it be:

  $message .= "lne99";

>
> mail ("email", "subject", $message);
>
>
> but when the email is received not all the new lines r taken. Can anyone
> help me.  Also where can I get a list of all the special chars like \n
> and what they meain.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Biggest security gap -- an open mouth.
*/
--- End Message ---
--- Begin Message ---


Hi I like to ask something

say i got this line

b = bla.net
a = blabla.com

(a and b NOT a variable)
i want to use php to take the second line and want to grep the
blabla.com
how can i do that



Yamin Prabudy
--- End Message ---
--- Begin Message ---
Hello,

I am creating dynamic CSV files using PHP, and currently these files are 
being saved on the server, but I would like to send them directly to the 
user who requested the file, similar to what phpMyAdmin does.  I looked at 
the source for phpMyAdmin and it was a bit complicated.  I was hoping there 
was a simpler solution to my problem.  Any suggestions?  Please email me 
directly, I'm not on the mailing list.  Thank you.

-Samuel


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

--- End Message ---
--- Begin Message ---
what are you doing a while on

if while never ends and you reset the time out each loop and use
ignore_user_abort(true), it will still be going 13 hours latter.

maybe if you send the full code so we can look at it.

Paul Roberts
[EMAIL PROTECTED]
++++++++++++++++++++++++
----- Original Message ----- 
From: "Matthew Delmarter" <[EMAIL PROTECTED]>
To: "Martin Towell" <[EMAIL PROTECTED]>
Cc: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 25, 2002 12:55 AM
Subject: RE: [PHP] set_time_limit() in a loop


> I should also mention that the loop is sending mail using mail().
> 
> Is it possible that this is the problem somehow?
> 
> -----Original Message-----
> From: Martin Towell [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 25, 2002 1:16 PM
> To: 'Matthew Delmarter'; PHP Mailing List
> Subject: RE: [PHP] set_time_limit() in a loop
> 
> your first thought was correct - it sets it to 1800, it's NOT
> accumulative.
> 
> it would have something to do with  ignore_user_abort(true); and also
> is your while loop's exit check working?
> 
> Martin
> 
> 
> -----Original Message-----
> 
> Just wondering about set_time_limit() in a loop.
> 
> The current code looks something like this:
> 
> <?
>  ignore_user_abort(true);
>  set_time_limit(1800);
>  while:
>         do stuff;
>         set_time_limit(1800);
>  endwhile;
> ?>
> 
> Does this reset the timeout to 1800 seconds every time it loops? Or
> does it accumulate so that the timeout has 1800 seconds added to it
> every time?
> 
> The reason I ask is that my ISP informs me that the script is still
> running 13 hours later! Or is this related to the ignore_user_abort?
> 
> Regards,
> Matthew Delmarter
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 

--- End Message ---
--- Begin Message ---
For whoever may have bumped into the same problem as Mr. Walker, please read the
release notes on sourceforge (kudos Matthew for the step-by-step bug-tracking -
I would've been unable to solve this for a long time without him).

This is my last message on this topic on the mailing list - I don't want to spam
you, but this was a serious issue if you didn't know where to look.

Thanks for your patience! :-)

Bogdan


> Matthew Walker wrote:
>
> > I downloaded the current version to test, and I don't know how you call
> > it stable enough to use. I continually get permission denied errors
> > accessing the DB. Some of them go away if I refresh, others don't. And
> > yes, the user has full permissions to the relevant DB.
> >
> > Matthew Walker
> > Ecommerce Project Manager
> > Mountain Top Herbs
> >
> > -----Original Message-----
> > From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 24, 2002 8:14 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Outreaching (announcement)
> >
> > Hi all!
> >
> > As posted some time ago, the company I'm working for developed a GPL
> > system
> > for project development (basically keeping in touch with the customers
> > while
> > developing a project). I think this project may be of some interest for
> > some
> > of you (well, hopefully, for may of you), so here's the manifesto:
> > ______________
> >
> > OPT (Outreach Project Tool) is a PHP general-purpose virtual commonplace
> > for
> > customers and developers to collaborate in developing projects. The
> > system
> > provides documents archive, e-mail archive, request tracker, task
> > management,
> > knowledge base, news administration, newsletter support and a lot of
> > other
> > features (some project-based, some system-based).
> > ______________
> >
> > Hope this may help some of you with your customers! The current version
> > is
> > 0.9 (beta - the first public release), but it's stable and comes with a
> > nice
> > setup interface (yes, I have been thinking of you guys). This release
> > has
> > been tested for more than eight months in a production environment, with
> > real
> > customers.
> >
> > So, the URL is http://sourceforge.net/projects/outreach - and you know
> > my
> > e-mail for complaints :-)
> >
> > HTH
> >
> > Bogdan


--- End Message ---
--- Begin Message ---
List,

I'm using the following code to retrieve image from Mysql. My problem is how
can I output another image if the given ID doesn't have an image on it??? I
had already inserted a blank gif in the database in order to use it, but
I've tried to check if ($resultado['Imagem_data'] == "") or  null and
outputs the blank gif, but didn't work.


    $conexao = new conexao();
    $query = new Query($conexao);
    $sql = "SELECT Imagem_data,Imagem_type FROM imagens WHERE
CelebID='$celebID'";
    $query->executa($sql);
    $resultado = $query->dados();
    $imagem_banco = $resultado['Imagem_data'];
    $type = $resultado['Imagem_type'];
    if($imagem_banco != "") {
        HEADER("Content-type: $type");
        echo($imagem_banco);
    }

Thank's

Rodrigo
-- 


--- End Message ---
--- Begin Message ---
The code below doesn't show the test you mentioned.  By all means testing if
a variable = "" should work, but you may want to try something like

if (!$resultado['Imagem_data']) {
    ...
}

Sometimes testing a value against "" can cause problems because of
non-appearing whitespace that may exist in the variable.  SOMETIMES, not all
the time, and I really couldn't tell you EXACTLY how PHP reacts to some of
these conditions, because I believe it to be system-dependent if memory
serves me (kind of like the differences between "\n" on Unix/Linux and
Windows).  Just play around with things, but I'd like to see the code you
are using for this condition.

Mike Frazer



"Rodrigo Peres" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> List,
>
> I'm using the following code to retrieve image from Mysql. My problem is
how
> can I output another image if the given ID doesn't have an image on it???
I
> had already inserted a blank gif in the database in order to use it, but
> I've tried to check if ($resultado['Imagem_data'] == "") or  null and
> outputs the blank gif, but didn't work.
>
>
>     $conexao = new conexao();
>     $query = new Query($conexao);
>     $sql = "SELECT Imagem_data,Imagem_type FROM imagens WHERE
> CelebID='$celebID'";
>     $query->executa($sql);
>     $resultado = $query->dados();
>     $imagem_banco = $resultado['Imagem_data'];
>     $type = $resultado['Imagem_type'];
>     if($imagem_banco != "") {
>         HEADER("Content-type: $type");
>         echo($imagem_banco);
>     }
>
> Thank's
>
> Rodrigo
> --
>
>


--- End Message ---

Reply via email to