php-general Digest 27 Feb 2006 08:48:39 -0000 Issue 3987

Topics (messages 231113 through 231126):

Re: Parsing PHP variables in XML document
        231113 by: Ivan Nedialkov
        231119 by: Bogdan Ribic

Re: PHP upgrade on Go Daddy virtual server
        231114 by: Nicolas Verhaeghe
        231118 by: John Nichel

recompiling php
        231115 by: blackwater dev

Re: How do I read Exif data without a file?
        231116 by: tedd
        231117 by: Niels

Constant Scope
        231120 by: Adrian Cid Almaguer
        231121 by: Adrian Cid Almaguer
        231122 by: Chris

mail function
        231123 by: Mohsen Pahlevanzadeh
        231126 by: Cristian MARIN

QUARANTINED:
        231124 by: WorkgroupMail Content Filter

PHP and Unicode
        231125 by: Foofy

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:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Well isn't there a way instead of using only variables, to use sth like
<?php echo $foo; ?>
I tried it but it doesnt work
The parser returns blank! 

On Sun, 2006-02-26 at 12:02 +0100, Bogdan Ribic wrote:
> Hmmm, come to think of it, it would only work if short_open_tags ini 
> directive is turned OFF, which in most cases it won't be :(
> 
> Bogdan Ribic wrote:
> > Hi Ivan,
> > 
> >   You might be able to use output buffering in conjunction with 
> > including your xml file. Something like:
> > 
> > ob_start();
> > include $xml_file;
> > $content = ob_end_flush();
> > 
> >   and then parse the $content string. If you are doing this from within 
> > a function and you want access to global variables, you should import 
> > all global variables first, via extract($GLOBALS);
> > 
> >   Btw, this is just an idea, and untested - use at your own risk :)
> > 
> > Boban.
> 
> 
> 
> 

--- End Message ---
--- Begin Message ---
Ivan,

Did you try entering the code with debugger, or at least printing out what output buffer was holding, ie $content var in my example? Can you post exact code? Also, is short_tags turned on or off in php.ini? If it is on, php will get confused on first line of your xml file, it will think that <?xml is a php openning tag.

In your original code you were calling the parser that was expecting $foo3 to be set, but you were setting the $foo3 *after* parsing, are you sure you're not making a mistake like that again?

Ivan Nedialkov wrote:
Well isn't there a way instead of using only variables, to use sth like
<?php echo $foo; ?>
I tried it but it doesnt work
The parser returns blank!
--

   Open source PHP code generator for DB operations
   http://sourceforge.net/projects/bfrcg/

--- End Message ---
--- Begin Message ---
Can't help. They basically tell you you are on your own.

-----Original Message-----
From: Gerry Danen [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 26, 2006 12:15 PM
To: Nicolas Verhaeghe
Cc: PHP General (E-mail)
Subject: Re: [PHP] PHP upgrade on Go Daddy virtual server


Have you tried GoDaddy support?

On 2/25/06, Nicolas Verhaeghe <[EMAIL PROTECTED]> wrote:
>
> Has anybody heard (or done it himself) how to upgrade PHP on a Go 
> Daddy virtual server?
>
> Current version is 4.3.11 and I'd like to upgrade to 5.1.2.
>
> All I know is that this server is a Red Hat Fedora 2.
>
> I have SSH access and root as well.
>

--- End Message ---
--- Begin Message ---
Nicolas Verhaeghe wrote:
Can't help. They basically tell you you are on your own.

http://us2.php.net/manual/en/install.php

--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message ---
I am trying to recompile php 5 with freetds so am using this :

./configure '--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-mysql=/root/mysql-standard-4.1.9-pc-linux-gnu-i686'
'--with-mssql=/usr/local/freetds'

Things seem ok so I do make and at the end of make I get this error:

/usr/bin/ld:ext/mssql/php_mssql.lo: file format not recognized; treating as
linker script
/usr/bin/ld:ext/mssql/php_mssql.lo:2: syntax error
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

I then did make install and of course got the same error:

/usr/bin/ld:ext/mssql/php_mssql.lo: file format not recognized; treating as
linker script
/usr/bin/ld:ext/mssql/php_mssql.lo:2: syntax error
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1


I then do make clean.  Of course, it doesn't seem to regenerate the
libphp5.so so once I restart apache, and check out phpinfo, it shows the old
configuration.

What's wrong?

Thanks!

--- End Message ---
--- Begin Message ---
tedd wrote:
Sameer said:

To get the thumbnails you must rewrite the resized file to some place (if you want real thumbnail image).


No, that's not correct. You can take an image from a db, create a thumbnail while it is in memory and display it. You don't need to make it a file first.
That *is* correct. You must rewrite the resized file to some place and that place can be /dev/foo (memory or disk). I did not say you must write it to /disk/.

Sameer N. Ingole

I don't want to argue semantics of what is a file, nor diction, but if that is what you meant, then what *is* clear is that your statement wasn't.

tedd

--
--------------------------------------------------------------------------------
http://sperling.com

--- End Message ---
--- Begin Message ---
On Sunday 26 February 2006 10:59, Sameer N Ingole wrote:

> In PHP its not easy to keep EXIF data of JPEG or TIF files as it is if
> you use PHP functions to recreate the temporary files in some dir.
> 
> Basically when you use tempnam() it creates a temporary file. To get the
> thumbnails you must rewrite the resized file to some place (if you want
> real thumbnail image). You cannot preserve exif data with any of PHP
> functions available. You probably have to use some specially developed
> code to write exif data. I tried this class
> 
> http://www.zonageek.com/software/php/jpeg/
> 
> I tried to use it but either it could not write all the exif data or I
> was not calling required functions properly.. It requires pear..
> 
> Other you can try is http://pel.sourceforge.net/
> 
> But both of these will require you to write a resized image and then
> write exif data (common for both, original and resized) retrieved from
> the original image to the new thumbnail you generated with additional
> image specific exif info.
> 
> Best is to maintain thumbnails.. with exif data written in it too.
> 
> Regards,
> 

Thank you for your answer. I wasn't trying to write exif data to an image,
just to read it. I've got it all working now.


//Niels

--- End Message ---
--- Begin Message ---
Can I give visibility to a class constan.

some thing like this

class foo
{

}

--
***********************************************************************
       Si se encuentra bien, no se preocupe. Se le pasarĂ¡.

--- End Message ---
--- Begin Message ---
Can I give visibility to a class constant.

something like this

class foo
{
  private const = "aaa";
  protected const = "bbb";
  public const = "ccc";
}

I dont want the user of my class can access to the constant.
and I cant use public static fields because I dont want the content can be
modified even inside the class.

--- End Message ---
--- Begin Message ---
Adrian Cid Almaguer wrote:
Can I give visibility to a class constant.

something like this

class foo
{
  private const = "aaa";
  protected const = "bbb";
  public const = "ccc";
}

I dont want the user of my class can access to the constant.
and I cant use public static fields because I dont want the content can be
modified even inside the class.


Mark it as static:

http://au.php.net/manual/en/language.oop5.static.php


--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Dear all,
I wanna mail to x user that x  can't see my IP address.
Do you know same function?
--Mohsen

--- End Message ---
--- Begin Message --- I don't know exactly if this problem belongs to this news forum. This is more or less a SMTP question.

The email servers names are kept into the mail MIME headers even if the message only passed through them and was then forwarded the servers names and IP's. This is done for anti-spam mesures, relay purposes, bouncing and other SMTP good reasons.
There are 3 ways to avoid this as far as I know:
1. To use internal networks relay servers with fake unroutable IP's like 127.x.x.x or 192.168.x.x. However the IP address of the gateway is visible and this will work only in case of big networks. 2. To use so many email redirect servers that the MIME message beeing too long will start cutting the origins. 3. To connect to the relay server using a masquerading anonymous public server with squid or other proxy software running on it.

However this is not legal and I will advise to not use these methods. You may be considered a SPAM sender and be sued for these kind of actions.


----------------------------------------
Cristian MARIN - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Developer Designers Division
InterAKT Online - http://www.interaktonline.com


Mohsen Pahlevanzadeh wrote:

Dear all,
I wanna mail to x user that x  can't see my IP address.
Do you know same function?
--Mohsen


--- End Message ---
--- Begin Message ---
The message "" from Post Office, sent on 2/27/2006 05:43 was quarantined 
because it contained either an executable file, a batch file or a screen saver 
file. All of these types of attachments are considered security risks. Please 
consult your mail administrator who can release the message.

--- End Message ---
--- Begin Message --- I learned PHP from an old O'Reilly book, and regarding Unicode it said "PHP's strings are always encoded in UTF-8." Since then I never gave it much thought, though I see a lot of ranting and wailing about lack of Unicode support in PHP. I also see a bunch of articles about work-arounds and fixes and good things to come in version 6.

Meanwhile I've been messing with a bunch of Chinese and Japanese text in PHP 4 and it seems to be working just fine. What am I missing? Are all these rants just old, am I lucky, or what? I imagine I'm just not understanding the whole thing, and I would really appreciate somebody pointing me in the right direction.
--- End Message ---

Reply via email to