Re: [PHP] Controling buffer: php/smarty or apache?

2006-01-23 Thread robert mena
Hi David,

Thanks for the reply.

I am aware of this 'browser' issue but it seems that it's not the case.
I'll look again but since I do not use tables only divs/css I am running out
of option on the html site.


On 1/22/06, David Tulloh [EMAIL PROTECTED] wrote:

 The browsers use a whole bunch of different ways to figure out how it
 should render the page and if it should do it on the fly or wait until
 the page is fully downloaded.

 Assuming the content you are testing is the same for the static and
 dynamic pages you should probably start looking for little things that
 may be different.  From what I've read, adding extra column information
 to the table tag and making sure the doctype is correct so you don't end
 up in quirks mode are both large factors.

 Using 'wget ---save-headers' and 'diff' will help you find any small
 difference between the pages.


 David

 robert mena wrote:
  Hi,
 
  I am facing a strange problem.  My site, even tough designed to appear
  quickly at user's browser, appears at once.  If I test the static HTML
  version it starts to appear as downloaded If I test the php generated
  version the page seems render as a whole.
 
  I am using smarty as a template and it seems to be related to a buffer
  somewhere: php/smarty or apache.
 
  I've used microtime and from the begin of the php script until after the
  smarty-display it takes from 0.05s (min) to 0.32s (max)
 
  Any tips of how can I figure out what is slowing down my site?
 
  tks
 




Re: [PHP] Re: Managing sessions...

2006-01-23 Thread David BERCOT
Hi,

OK. I have many answers about managing sessions and I thank everyone.
The best solution seems to be the inclusion of a file...
But, I have just another question about all the options I have to put in
this file... Is it necessary to do all of this (sorry for my
commentaries which are in French) :
// On demande à PHP d'utiliser des cookies pour gérer les sessions.
ini_set(session.use_cookies,1);
// D'autre part, on précise que cette gestion des sessions sera faite
uniquement via les cookies.
ini_set(session.use_only_cookies,1);
// On désactive l'utilisation transparente du SID.
ini_set(session.use_trans_sid,0);
// On précise le nombre de secondes après lesquelles le cookie de
session sera détruit (si on met '0',
// il sera effacé lors de la fermeture du navigateur).
ini_set(cookie_lifetime,0);
// On précise la durée des pages liées à la session dans le cache (par
défaut, 180 minutes).
ini_set(session.cache_expire,24); // ici, 24 minutes
// On précise le nombre de secondes après lesquelles les fichiers de
sessions gérés sur le serveur seront
// considérés comme obsolètes et pourront donc être détruits
automatiquement (voire ci-dessous).
ini_set(session.gc_maxlifetime,1440); // ici, 24 minutes
// On précise la probabilité selon laquelle le nettoyage des fichiers
obsolètes (voire ci-dessus)
// s'effectue lors d'une sollicitation du serveur. Dans notre cas, 5 %
(gc_probability/gc_divisor)
// des requêtes seront accompagnées d'une suppression des fichiers
obsolètes (garbage collector).
// Toutefois, sous Debian, à cause de permissions strictes
sur /var/lib/php5, ceci est désactivé !
// ini_set(session.gc_probability,5); [à titre d'information]
ini_set(session.gc_divisor,100);
// On précise le nom de notre session (pour permettre à des
sous-applications d'utiliser
// des sessions distinctes en gardant en tête la session de base).
ini_set(session.name,SID_SDSED);
// On active la remontée de toutes les erreurs (en production, il faudra
faire l'inverse !).
ini_set(error_reporting,E_ALL | E_STRICT);
// On affiche les éventuelles erreurs à l'écran (idem en production que
ci-dessus).
ini_set(display_errors,1);
// On lance la session
session_start();

Thank you very much.

David.

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



Re: [PHP] php5 iterate an object

2006-01-23 Thread Jochem Maas

Henrik Gemal wrote:

I have an object that looks like this:

Test Object


the class Test must implement 'Iterator'

e.g.

class Test implements Iterator
{

/*
 * Iterator methods
 */
public function rewind(){}
public function current(){}
public function valid(){}
public function next(){}
public function key(){}
public function count(){}
}

you'll have to fill in the body of those methods
yourself!

once you have done that yuou will be able to do something like:

$t = new Test();
foreach($t as $key = $value) {
echo $key,' - ',$value,\n;
}


(
[config] = TestConfig Object
(
[file:protected] = test.conf
[kill:protected] = 1
)

[location:private] = test
}


I'm trying to write an PHP5 iterator that can iterate over an object but 
I'm not sure how. The manual for PHP5 iterators seems to only work with 
arrays. How do I iterate over an object and only get the name of the 
attribute (config) and not the entire name (Test::config)


I'd question what you are trying to do; it sounds liek an Iterator is
not the right tool for the job.





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



[PHP] Re: Can PHP works with telnet?

2006-01-23 Thread HoWang Wang

Hi,
It's me again. I have take a look on 
http://www.geckotribe.com/php-telnet/ , but I think the codes are not 
friendly to me. So I create my own telnet class for my program. I'm 
going to post it here for reference. But it is made just for my program 
so you may have difficulty when you try to use it on a normal telnet 
connection.


?php

class telnet
{
// Host
var $host = '127.0.0.1';
// Port
var $port = 23;
// Use usleep?
var $usleep = 1;

// --- End of config ---

// File Pointer
var $fp;
// This is the Telnet headers
var $header1;
var $header2;

function telnet($host,$port)
{
if (!empty($host)) $this-host = $host;
if (!empty($port)) $this-port = $port;
	 
$this-header1=chr(0xFF).chr(0xFB).chr(0x1F).chr(0xFF).chr(0xFB).chr(0x20).chr(0xFF).chr(0xFB).
		 
chr(0x18).chr(0xFF).chr(0xFB).chr(0x27).chr(0xFF).chr(0xFD).chr(0x01).chr(0xFF).chr(0xFB).
		 
chr(0x03).chr(0xFF).chr(0xFD).chr(0x03).chr(0xFF).chr(0xFC).chr(0x23).chr(0xFF).chr(0xFC).
		 
chr(0x24).chr(0xFF).chr(0xFA).chr(0x1F).chr(0x00).chr(0x50).chr(0x00).chr(0x18).chr(0xFF).
		 
chr(0xF0).chr(0xFF).chr(0xFA).chr(0x20).chr(0x00).chr(0x33).chr(0x38).chr(0x34).chr(0x30).
		 
chr(0x30).chr(0x2C).chr(0x33).chr(0x38).chr(0x34).chr(0x30).chr(0x30).chr(0xFF).chr(0xF0).
		 
chr(0xFF).chr(0xFA).chr(0x27).chr(0x00).chr(0xFF).chr(0xF0).chr(0xFF).chr(0xFA).chr(0x18).
		 
chr(0x00).chr(0x58).chr(0x54).chr(0x45).chr(0x52).chr(0x4D).chr(0xFF).chr(0xF0); 

	 
$this-header2=chr(0xFF).chr(0xFC).chr(0x01).chr(0xFF).chr(0xFC).chr(0x22).chr(0xFF).chr(0xFE).

 chr(0x05).chr(0xFF).chr(0xFC).chr(0x21);
$this-connect();
}

function sleep()
{
if ($this-usleep)
{
usleep(125000);
}
else
{
sleep(1);
}
}

function connect()
{
$this-fp = fsockopen($this-host,$this-port);
fputs($this-fp,$this-header1);
$this-sleep();
fputs($this-fp,$this-header2);
$this-sleep();
}

function docmd($cmd)
{
fputs($this-fp,$cmd . \r);
$this-sleep();
}

function readresp()
{
do
{
// read line by line, or at least small chunks
$output.=fread($fp, 80);
$stat=socket_get_status($fp);
}
while($stat[unread_bytes]);
$output = str_replace(\n, br, $output);
echo $output;
}

function disconnect()
{
fclose($this-fp);
}
}
?


Thanks to all the repliers.



HoWang Wang wrote:

Hi all,

Recently I got a job to write a PHP webpage to display some infomation
which have to obtain from telnet. Telnet is the only way to query the
software. I have made a quick search on php.net but I can't found amy
extension support telnet. Is there any way to do so? Or it is impossible
with PHP but can be done with external binaries?
Please help, thanks.

HoWang Wong


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



[PHP] Php4 with mysql flag

2006-01-23 Thread Markus Braun

Hello together,

how can i activate php with mysql.

At the moment my php info told me, without mysql.

I have installed it with apt-get install php4 php4-mysql

I have also debian sarge version.

Can somebody help me?

Thanks
marcus

_
Haben Spinnen Ohren? Finden Sie es heraus – mit dem MSN Suche Superquiz via  
http://www.msn-superquiz.de  Jetzt mitmachen und gewinnen!


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



Re: [PHP] Php4 with mysql flag

2006-01-23 Thread David Grant
Markus,

Markus Braun wrote:
 I have installed it with apt-get install php4 php4-mysql

I think you'll need libapache-mod-php4 too (p.d.o is down at the moment,
so can't be sure), as well as the mysql-server and mysql-client packages.

David
-- 
David Grant
http://www.grant.org.uk/

http://pear.php.net/package/File_Ogg0.2.1
http://pear.php.net/package/File_XSPF   0.1.0

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



Re: [PHP] Php4 with mysql flag

2006-01-23 Thread Markus Braun

I think you'll need libapache-mod-php4 too (p.d.o is down at the moment,
so can't be sure), as well as the mysql-server and mysql-client packages.


The output of libapache2-mod-php4 is:

Reading Package Lists...
Building Dependency Tree...
libapache2-mod-php4 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I have apache2 :-)

Also :

Reading Package Lists...
Building Dependency Tree...
mysql-server is already the newest version.
mysql-client is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


:-(

_
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit 
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu! 
http://desktop.msn.de/ Jetzt gratis downloaden!


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



[PHP] Re: PHP SSH2

2006-01-23 Thread Vedanta Barooah
On 1/23/06, Vedanta Barooah [EMAIL PROTECTED] wrote:

 hello all,
 this is in regard to PECL ssh2 ( http://pecl.php.net/package/ssh2 ) : how
 to i print the output of the command executed using ssh2_exec?
 thanks,
 vedanta




--
*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*
Vedanta Barooah
YM! - vedanta2006
Skype - vedanta2006


Re: [PHP] Php4 with mysql flag

2006-01-23 Thread David Grant
Markus,

Markus Braun wrote:
 libapache2-mod-php4 is already the newest version.
 mysql-server is already the newest version.
 mysql-client is already the newest version.

That should be all you need then.  Have you restarted apache yet?

David
-- 
David Grant
http://www.grant.org.uk/

http://pear.php.net/package/File_Ogg0.2.1
http://pear.php.net/package/File_XSPF   0.1.0

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



Re: [PHP] Re: PHP SSH2

2006-01-23 Thread David Grant
Vedanta,

I recommend contacting the author of the package, or posting to pecl-dev.

David

Vedanta Barooah wrote:
 On 1/23/06, Vedanta Barooah [EMAIL PROTECTED] wrote:
 hello all,
 this is in regard to PECL ssh2 ( http://pecl.php.net/package/ssh2 ) : how
 to i print the output of the command executed using ssh2_exec?
 thanks,
 vedanta

 
 
 
 --
 *~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*
 Vedanta Barooah
 YM! - vedanta2006
 Skype - vedanta2006
 


-- 
David Grant
http://www.grant.org.uk/

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



[PHP] Search files in a directory!

2006-01-23 Thread Nicholas Couloute
I want to setup a search box that will search all the filenames in a 
given directory for the keyword provided by the user and display all the 
files that have that keyword? how would I do this? at least the 
searching part?



~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com

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



[PHP] Re: Search files in a directory!

2006-01-23 Thread Barry

Nicholas Couloute wrote:
I want to setup a search box that will search all the filenames in a 
given directory for the keyword provided by the user and display all the 
files that have that keyword? how would I do this? at least the 
searching part?



~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com


http://de3.php.net/opendir

RTFM

Barry

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



[PHP] issue with newsgroups server

2006-01-23 Thread Alain Roger
Hi,

I have a very long timeout when i try to use the news.php.net server.
moreover, my posted messages are not displayed.

Could someone help me please ?

thanks a lot,
Alain


[PHP] hiding the index.php page.

2006-01-23 Thread Gregory Machin
Hi
I would like to know how i would hide my index page so that it is not shown
at the end of the url like how gmail does it and many cms do it ..
And what is it called when one does this ..

Thank you

--
Gregory Machin
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.linuxpro.co.za
www.exponent.co.za
Web Hosting Solutions
Scalable Linux Solutions
www.iberry.info (support and admin)

+27 72 524 8096


[PHP] Re: hiding the index.php page.

2006-01-23 Thread Barry

Gregory Machin wrote:

Hi
I would like to know how i would hide my index page so that it is not shown
at the end of the url like how gmail does it and many cms do it ..
And what is it called when one does this ..

Thank you

--
Gregory Machin
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.linuxpro.co.za
www.exponent.co.za
Web Hosting Solutions
Scalable Linux Solutions
www.iberry.info (support and admin)

+27 72 524 8096


Define the Default shown page by your webserver config so that index.php 
is automatically shown when opening a folder ie www.somewebsite.com/folder/


The default config is mostly default.htm default.html index.htm index.html

This might help you finding it

Greets
Barry

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



[PHP] secure logon php page

2006-01-23 Thread Alain Roger
Hi,

I would like to write a secured logon page but i do not have any idea where
to start...
i've alreay setup my Apache server for using SSL, but what about the PHP
code ? with or without cookie ? crypted or not ?

please, could you give me some good tutorial or web page where i can find
such information ?
or maybe you have such info ? ;-)

thanks a lot,

Alain


Re: [PHP] Controling buffer: php/smarty or apache?

2006-01-23 Thread Sumeet

robert mena wrote:


Hi,

I am facing a strange problem.  My site, even tough designed to appear
quickly at user's browser, appears at once.  If I test the static HTML
version it starts to appear as downloaded If I test the php generated
version the page seems render as a whole.

I am using smarty as a template and it seems to be related to a buffer
somewhere: php/smarty or apache.

I've used microtime and from the begin of the php script until after the
smarty-display it takes from 0.05s (min) to 0.32s (max)

Any tips of how can I figure out what is slowing down my site?

tks

 


yes..use cache and use gzip compress...  check http://pear.php.net

if u use cache, that page is generated once and the next time is 
download from the table. php script does take timehence cache always 
helps.


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



Re: [PHP] Php4 with mysql flag

2006-01-23 Thread Markus Braun

That should be all you need then.  Have you restarted apache yet?


yes with the command:

/etc/init.d/apache2 restart

Must i compile php new? or reconfigure it?

I try to install the script gallery. Do you know this?

In this script i get the error that i must install the php mysql modul.

MYSQL and PHPMYADMIN is also running.

Here i attached my phpinfo.

I hope this helps more.

marcus

_
Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie gleichzeitig 
im Web, Ihren E-Mails und auf Ihrem PC! Jetzt neu! http://desktop.msn.de/ 
Jetzt gratis downloaden!


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

[PHP] secured logon page

2006-01-23 Thread Alain Roger
Hi,

I would like to write a secured logon page but i do not have any idea where
to start...
i've alreay setup my Apache server for using SSL, but what about the PHP
code ? with or without cookie ? crypted or not ?

please, could you give me some good tutorial or web page where i can find
such information ?
or maybe you have such info ? ;-)

thanks a lot,

Alain


[PHP] Re: secure logon php page

2006-01-23 Thread Barry

Alain Roger wrote:

Hi,

I would like to write a secured logon page but i do not have any idea where
to start...
i've alreay setup my Apache server for using SSL, but what about the PHP
code ? with or without cookie ? crypted or not ?

please, could you give me some good tutorial or web page where i can find
such information ?
or maybe you have such info ? ;-)

thanks a lot,

Alain



An SSL secured logon page?

Well open your website where you wanna login with https://blahblah.

Send the login to a PHP file (with POST) that verifies that login. done.

Easy, isnt it? _

Greets
Barry

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



Re: [PHP] Re: hiding the index.php page.

2006-01-23 Thread Sumeet

Barry wrote:

Gregory Machin wrote:


Hi
I would like to know how i would hide my index page so that it is not 
shown

at the end of the url like how gmail does it and many cms do it ..
And what is it called when one does this ..

Thank you

--


not sure...but u can use frames. the main page being within the frame. 
and the visitor can then browser within the main frame. the top url will 
remain the same.


--
Sumeet Shroff
http://www.prateeksha.com
Web Design and Ecommerce Development, Mumbai India

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



Re: [PHP] Re: hiding the index.php page.

2006-01-23 Thread Silvio Porcellana [tradeOver]

Barry wrote:

Gregory Machin wrote:

Hi
I would like to know how i would hide my index page so that it is not 
shown

at the end of the url like how gmail does it and many cms do it ..
And what is it called when one does this ..

Thank you



If you use Apache, what you are looking for is probably the 
'DirectoryIndex' directive:

http://httpd.apache.org/docs/2.0/mod/mod_dir.html#directoryindex

But it could also be that you mean something that needs 'mod_rewrite', 
in this case I guess it's better if you search the archives:

http://marc.theaimsgroup.com/?l=php-generalw=2r=1s=mod_rewriteq=b

HTH!
Ciao, Silvio

--
tradeOver | http://www.tradeover.net
...ready to become the King of the World?

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



[PHP] phpmyadmin import

2006-01-23 Thread William Stokes
Hello,

When importing data from file with phpmyadmin the file max size is 2 048kb. 
Can this be changed to accept larger files?

It would be more convenient to import data to my test DB if this could be 
done via single file export/import.

Thanks
-Will

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



[PHP] [NEWBIE GUIDE] - suggestions for new list members

2006-01-23 Thread Jay Blanchard
=
Please feel free to add more points and updates. 
20050322jb - Note the new location of PHP Editors list.
=

1. If you have any queries/problems about PHP try
http://www.php.net/manual/en first. You can download a copy and use it
offline also. For example, a frequent question is how do I upload files
with PHP?. If you type http://www.php.net/upload into your browser's
address bar you will taken indirectly to the answers. Other searches of this
nature may be more direct.

Please also try http://www.php.net/manual/faq.php for answers to frequently
answered questions about PHP [added by Christophe Chisogne].

2. Try http://www.google.com next. Searching for php YOUR QUERY may fetch
you relevant information within the first 10 results.

3. There is a searchable archive of the mailing list discussion at
http://phparch.com/mailinglists. Many of the common topics are discussed
repeatedly, and you may get answer to your query from the earlier
discussions. 

For example: One of the repeatedly discussed question in the list is Best
PHP editor. Everyone has his/her favourite editor. You can get all the
opinions by going through the list archives. If you want a chosen list try
this link :
http://www.thelinuxconsultancy.co.uk/phpeditors.php [contributed by
Christophe Chisogne].

4. Not sure if PHP is working or you want find out what extensions are
available to you?

Just put the following code into a file with a .php extension and access it
through your webserver:

?php
phpinfo();
? 

If PHP is installed you will see a page with a lot of information on it. If
PHP is not installed (or not working correctly) your browser will try to
download the file. [contributed by Teren and reworded by Chris W Parker]

5. If you are stuck with a script and do not understand what is wrong,
instead of posting the whole script, try doing some research yourself. One
useful trick is to print the variable/sql query using print or echo command
and check
whether you get what you expected. 

After diagnosing the problem, send the details of your efforts (following
steps 1, 2  3) and ask for help.

6. PHP is a server side scripting language. Whatever processing PHP does
takes place BEFORE the output reaches the client. Therefore, it is not
possible to access users' computer related information (OS, screen size etc)
using PHP. Nor can you modify any the user side settings. You need to go for
JavaScript and ask the question in a JavaScript list.

On the other hand, you can access the information that is SENT by the user's
browser when a client requests a page from your server. You can find details
about browser, OS etc as reported by this request. [contributed by Wouter
van Vliet and reworded by Chris W Parker.]

7. Provide a clear descriptive subject line. Avoid general subjects like
Help!!, A Question etc. Especially avoid blank subjects. 

8. When you want to start a new topic, open a new mail composer and enter
the mailing list address php-general@lists.php.net instead of replying to an
existing thread and replacing the subject and body with
your message.

9. It's always a good idea to post back to the list once you've solved your
problem. People usually add [SOLVED] to the subject line of their email when
posting solutions. By posting your solution you're helping
the next person with the same question. [contribued by Chris W Parker]

10. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard]

11. Do not send your email to the list with attachments. If you don't have a
place to upload your code, try the many pastebin websites (such as
www.pastebin.com). [contributed by Burhan Khalid]

12. Although the following suggestions have been known to be debatable they
should help you in general internet mailing list 'netiquette';

a. Please do not top post as it is hard to follow. If you are unfamiliar
with the concept it is the posting of the reply ABOVE the thing that is
being replied to.

top-posting
What is a bad idea?

b. Where possible trim your posts so that only relevant portions of the
message are being discussed. Replies that become too lengthy are likely to
be ignored.

Following these guidelines will ensure that you get effective responses from
the list members. Otherwise, your questions might not be answered.

===
Hope you have a good time programming with PHP.
===

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



Re: [PHP] phpmyadmin import

2006-01-23 Thread Austin Denyer

On Mon, 23 Jan 2006 15:37:37 +0200
William Stokes [EMAIL PROTECTED] wrote:
 
 When importing data from file with phpmyadmin the file max size is 2
 048kb. Can this be changed to accept larger files?

Yes.

Look at your php.ini file - change the upload_max_filesize to the
filesize you want.

Regards,
Ozz.


pgpMZkXrJgP7a.pgp
Description: PGP signature


Re[2]: [PHP] XML and special characters

2006-01-23 Thread Steve Clay
Sunday, January 22, 2006, 10:10:54 PM, Adam Hubscher wrote:
 ee dee da da da? sect;eth; -- those that look like html entities are
 the represented characters. I was mistaken, they are html entities, 

Can you show us a small chunk of this XML that throws errors?

You said you've tried various parsers.  Did none of those parsers have
error logging capabilities?  Show us the errors.

Steve
-- 
http://mrclay.org/

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



Re: [PHP] hiding the index.php page.

2006-01-23 Thread tedd

Hi
I would like to know how i would hide my index page so that it is not shown
at the end of the url like how gmail does it and many cms do it ..
And what is it called when one does this ..

Thank you

--
Gregory Machin


Gregory:

If I understand what you want, it's very simple, just put your 
index.php in a folder and make the path for the url just up to that 
folder. You are not hiding it, but rather letting the default for the 
folder work.


I do it all the time, for examples see:

http://xn--ovg.com

Each one of those links could be called by adding index.php to the 
end of the url.


HTH's.

tedd
--

http://sperling.com/

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



Re: [PHP] Php4 with mysql flag

2006-01-23 Thread Markus Braun

so it works now.

Thanks



From: David Grant [EMAIL PROTECTED]
CC: php-general@lists.php.net
Subject: Re: [PHP] Php4 with mysql flag
Date: Mon, 23 Jan 2006 12:07:29 +

Markus,

Markus Braun wrote:
 libapache2-mod-php4 is already the newest version.
 mysql-server is already the newest version.
 mysql-client is already the newest version.

That should be all you need then.  Have you restarted apache yet?

David
--
David Grant
http://www.grant.org.uk/

http://pear.php.net/package/File_Ogg0.2.1
http://pear.php.net/package/File_XSPF   0.1.0

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



_
Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie gleichzeitig 
im Web, Ihren E-Mails und auf Ihrem PC! Jetzt neu! http://desktop.msn.de/ 
Jetzt gratis downloaden!


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



Re: [PHP][SOLVED] Re: Search files in a directory!

2006-01-23 Thread Nicholas Couloute

thank you barry! function substr_count() does what I need!

On Mon, 23 Jan 2006 9:13 am, Barry Krein wrote:

Nicholas Couloute wrote:

What would I do to the variable each tome to compare it to the query?
~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com

use substring count or any other string reading function that helps 
comparing two strings

keyword - Filename

all such functions can be found on php.net

Greets
barry

~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com

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



Re[2]: [PHP] Re: Managing sessions...

2006-01-23 Thread Steve Clay
Monday, January 23, 2006, 5:06:02 AM, David BERCOT wrote:
 But, I have just another question about all the options I have to put in
 this file... Is it necessary to do all of this (sorry for my

Check phpinfo(). Several of those settings may already be set by your
server's php.ini file. Generally, using ini_set() should be a last resort
because, once PHP is running, it's too late to change certain settings.
http://php.net/manual/en/configuration.changes.php

Steve
-- 
http://mrclay.org/

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



[PHP] Adventures in Cookies

2006-01-23 Thread tedd

Hi all:

While I'm sure this is obvious for most, but I just discovered this.

Using one browser (browser A) I can access one of my pages and create 
a cookie with a user input value.


Then using a different browser (browser B), I can access the same 
page and create another cookie with another user value.


Now, it would seem to me that I shouldn't have two cookies with the 
same name both having different contents, but that's exactly what 
I've found -- for browser A will produce one value and browser B will 
produce another value.


Now, does anyone know where it says in any php documentation that 
COOKIE values are dependent upon browser type?


tedd

--

http://sperling.com/

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



Re: [PHP] Adventures in Cookies

2006-01-23 Thread David Grant
Tedd,

tedd wrote:
 Hi all:
 
 While I'm sure this is obvious for most, but I just discovered this.
 
 Using one browser (browser A) I can access one of my pages and create a
 cookie with a user input value.
 
 Then using a different browser (browser B), I can access the same page
 and create another cookie with another user value.
 
 Now, it would seem to me that I shouldn't have two cookies with the same
 name both having different contents, but that's exactly what I've found
 -- for browser A will produce one value and browser B will produce
 another value.

Can you provide some examples for what you mean?

David
-- 
David Grant
http://www.grant.org.uk/

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



[PHP] Re: Adventures in Cookies

2006-01-23 Thread Barry

tedd wrote:

Hi all:

While I'm sure this is obvious for most, but I just discovered this.

Using one browser (browser A) I can access one of my pages and create a 
cookie with a user input value.


Then using a different browser (browser B), I can access the same page 
and create another cookie with another user value.


Now, it would seem to me that I shouldn't have two cookies with the same 
name both having different contents, but that's exactly what I've found 
-- for browser A will produce one value and browser B will produce 
another value.


Now, does anyone know where it says in any php documentation that COOKIE 
values are dependent upon browser type?


tedd


Please let us know what exectly is stored in that cookie.

probably we can help you then.

by the way. Cookies are not developed by PHP just used by it.

So if you might google for it, you will get quicker an answer than 
asking in a PHP mailing list.


Normally if you store values in Cookies by PHP it should be the exact 
same on every browser, only if you store browser related values.


Greets
Barry

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



Re: [PHP] Adventures in Cookies

2006-01-23 Thread Austin Denyer

On Mon, 23 Jan 2006 11:30:32 -0500
tedd [EMAIL PROTECTED] wrote:
 
 While I'm sure this is obvious for most, but I just discovered this.
 
 Using one browser (browser A) I can access one of my pages and create 
 a cookie with a user input value.
 
 Then using a different browser (browser B), I can access the same 
 page and create another cookie with another user value.
 
 Now, it would seem to me that I shouldn't have two cookies with the 
 same name both having different contents, but that's exactly what 
 I've found -- for browser A will produce one value and browser B will 
 produce another value.
 
 Now, does anyone know where it says in any php documentation that 
 COOKIE values are dependent upon browser type?

This is a function of the way cookies work, and is not a php issue.

Cookies are stored by the browser wherever the browser chooses to place
them.  If another browser cannot access them it cannot send any info
back so it will receive a new one.

Regards,
Ozz.


pgptMNZoBHjP0.pgp
Description: PGP signature


[PHP] Re: security of uploaded gif files

2006-01-23 Thread Barry

James Benson wrote:
Even if you can embed PHP in a GIF it would still need to be executed by 
PHP as PHP code, would PHP actually execute that file when it looks like 
an image, I would think PHP would output an error?



More importantly though, you should be checking the file extension of 
uploaded files to make sure it is only a .gif




James



jonathan wrote:

what is the best way to prevent malicious code from being uploaded via 
a .gif file? A friend showed me how php could be embedded within the 
.gif file. Does this problem also exist for .jpeg's?


thanks,

jon




It is possible for example to use php for showing images like
fopen and print a random image file.
so opening the .php file will show you a random image.

But if the server isnt set to parse other files than PHP you wont be 
able to execute code.


But when server is set so, yes its possible.

Thats why checking the file for php alike contents could be useful.

I thought there was something like a de-evaluate PHP function that rips 
off every php code of a textfile/sended text by form or else.

That could be useful too.

Greets
Barry

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



Re: [PHP] Adventures in Cookies

2006-01-23 Thread Austin Denyer

On Mon, 23 Jan 2006 16:37:12 +
David Grant [EMAIL PROTECTED] wrote:
 
 tedd wrote:
  Hi all:
  
  While I'm sure this is obvious for most, but I just discovered this.
  
  Using one browser (browser A) I can access one of my pages and
  create a cookie with a user input value.
  
  Then using a different browser (browser B), I can access the same
  page and create another cookie with another user value.
  
  Now, it would seem to me that I shouldn't have two cookies with the
  same name both having different contents, but that's exactly what
  I've found -- for browser A will produce one value and browser B
  will produce another value.
 
 Can you provide some examples for what you mean?

I think he's referring to the fact that you can have one cookie in,
say, Mozilla and another one in, say, Konqueror (or Internet Exploiter
if you do Windoze).

Regards,
Ozz.


pgpCzqzrfWn7S.pgp
Description: PGP signature


Re: [PHP] Adventures in Cookies

2006-01-23 Thread Barry

Austin Denyer wrote:

On Mon, 23 Jan 2006 16:37:12 +
David Grant [EMAIL PROTECTED] wrote:


tedd wrote:


Hi all:

While I'm sure this is obvious for most, but I just discovered this.

Using one browser (browser A) I can access one of my pages and
create a cookie with a user input value.

Then using a different browser (browser B), I can access the same
page and create another cookie with another user value.

Now, it would seem to me that I shouldn't have two cookies with the
same name both having different contents, but that's exactly what
I've found -- for browser A will produce one value and browser B
will produce another value.


Can you provide some examples for what you mean?



I think he's referring to the fact that you can have one cookie in,
say, Mozilla and another one in, say, Konqueror (or Internet Exploiter
if you do Windoze).

Regards,
Ozz.

No i think he is more referring to that some different values are stored.

But unless we dont get an example, it's useless to discuss that further :P

Barry

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



RE: [PHP] Adventures in Cookies

2006-01-23 Thread Dan Parry
I would have thought this was standard behaviour... Different browsers [can]
store their cookies in different locations on the drive don't they?

It's my experience that cookies are always handled autonomously and
asynchronously by browsers (ie set a cookie in one browser and another won't
see it)

Either way I don't believe this to be a PHP specific issue :)

Just my tuppence worth

Dan
-Original Message-
From: tedd [mailto:[EMAIL PROTECTED] 
Sent: 23 January 2006 16:31
To: php-general@lists.php.net
Subject: [PHP] Adventures in Cookies

Hi all:

While I'm sure this is obvious for most, but I just discovered this.

Using one browser (browser A) I can access one of my pages and create 
a cookie with a user input value.

Then using a different browser (browser B), I can access the same 
page and create another cookie with another user value.

Now, it would seem to me that I shouldn't have two cookies with the 
same name both having different contents, but that's exactly what 
I've found -- for browser A will produce one value and browser B will 
produce another value.

Now, does anyone know where it says in any php documentation that 
COOKIE values are dependent upon browser type?

tedd

-- 


http://sperling.com/

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

__ NOD32 1.1372 (20060119) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com

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



Re: [PHP] Adventures in Cookies

2006-01-23 Thread David Grant
Austin,

Austin Denyer wrote:
 On Mon, 23 Jan 2006 16:37:12 +
 David Grant [EMAIL PROTECTED] wrote:
 tedd wrote:
 ...
 Can you provide some examples for what you mean?
 
 I think he's referring to the fact that you can have one cookie in,
 say, Mozilla and another one in, say, Konqueror (or Internet Exploiter
 if you do Windoze).

Rightio.

David
-- 
David Grant
http://www.grant.org.uk/

http://pear.php.net/package/File_Ogg0.2.1
http://pear.php.net/package/File_XSPF   0.1.0

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



Re: [PHP] Adventures in Cookies

2006-01-23 Thread David Grant
Barry wrote:
 Austin Denyer wrote:
 On Mon, 23 Jan 2006 16:37:12 +
 David Grant [EMAIL PROTECTED] wrote:

 tedd wrote:

 Hi all:

 While I'm sure this is obvious for most, but I just discovered this.

 Using one browser (browser A) I can access one of my pages and
 create a cookie with a user input value.

 Then using a different browser (browser B), I can access the same
 page and create another cookie with another user value.

 Now, it would seem to me that I shouldn't have two cookies with the
 same name both having different contents, but that's exactly what
 I've found -- for browser A will produce one value and browser B
 will produce another value.

 Can you provide some examples for what you mean?


 I think he's referring to the fact that you can have one cookie in,
 say, Mozilla and another one in, say, Konqueror (or Internet Exploiter
 if you do Windoze).

 Regards,
 Ozz.

IE:

 No i think he is more referring to that some different values are stored.
 
 But unless we dont get an example, it's useless to discuss that further :P
 
 Barry
 


-- 
David Grant
http://www.grant.org.uk/

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



Re: [PHP] Adventures in Cookies

2006-01-23 Thread David Grant
Please ignore the previous e-mail: I slipped on the keyboard. :)


-- 
David Grant
http://www.grant.org.uk/

http://pear.php.net/package/File_Ogg0.2.1
http://pear.php.net/package/File_XSPF   0.1.0

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



[PHP] Cookie reposted

2006-01-23 Thread tedd

Hi:

After I successfully writing a cookie, I'm having a problems reading 
the cookie repeatedly.


The first time into my read the cookie page, the cookie is read. 
However, the second time, it's not.


If I quit my browser and then reenter the read the cookie page, the 
cookie is there and read again. But leaving the page and returning 
produces no cookie. The cookie remains, but the page doesn't read it.


I have set up an example at:

http://xn--ovg.com

Do 1, Set Cookie -- it will create a cookie and report it. Then go to main
Do 2, Get Cookie -- it will report no cookie found.

[A] Quit your browser.

Return to:

http://xn--ovg.com/cookie/getcookie.php

It WILL report your cookie.

Leave the page and return back from anywhere, and your cookie will 
not be reported as there. However, if you go to [A] and repeat, 
you'll find your cookie remains.


Surely someone must know what's happening here.

Does anyone have any ideas?

It would be nice to have a persistent cookie. Do I also have to use a 
session to make this happen?


tedd
--

http://sperling.com/

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



Re: [PHP] Cookie reposted

2006-01-23 Thread David Grant
Tedd,

The cookie is being set on the www.xn--ovg.com domain.  The cookie is
being read on xn--ovg.com domain.  This is perceived to be a security
risk, so the cookie isn't sent.

David

tedd wrote:
 Hi:
 
 After I successfully writing a cookie, I'm having a problems reading the
 cookie repeatedly.
 
 The first time into my read the cookie page, the cookie is read.
 However, the second time, it's not.
 
 If I quit my browser and then reenter the read the cookie page, the
 cookie is there and read again. But leaving the page and returning
 produces no cookie. The cookie remains, but the page doesn't read it.
 
 I have set up an example at:
 
 http://xn--ovg.com
 
 Do 1, Set Cookie -- it will create a cookie and report it. Then go to
 main
 Do 2, Get Cookie -- it will report no cookie found.
 
 [A] Quit your browser.
 
 Return to:
 
 http://xn--ovg.com/cookie/getcookie.php
 
 It WILL report your cookie.
 
 Leave the page and return back from anywhere, and your cookie will not
 be reported as there. However, if you go to [A] and repeat, you'll find
 your cookie remains.
 
 Surely someone must know what's happening here.
 
 Does anyone have any ideas?
 
 It would be nice to have a persistent cookie. Do I also have to use a
 session to make this happen?
 
 tedd


-- 
David Grant
http://www.grant.org.uk/

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



[PHP] Re: security of uploaded gif files

2006-01-23 Thread James Benson
Even if you can embed PHP in a GIF it would still need to be executed by 
PHP as PHP code, would PHP actually execute that file when it looks like 
an image, I would think PHP would output an error?



More importantly though, you should be checking the file extension of 
uploaded files to make sure it is only a .gif




James



jonathan wrote:
what is the best way to prevent malicious code from being uploaded via a 
.gif file? A friend showed me how php could be embedded within the .gif 
file. Does this problem also exist for .jpeg's?


thanks,

jon


--



-

http://www.ciwcertified.com - Master CIW Designer
http://www.zend.com - Zend Certified Engineer


http://www.jamesbenson.co.uk

-

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



Re: [PHP] Adventures in Cookies

2006-01-23 Thread tedd

Tedd,

tedd wrote:

 Hi all:

 While I'm sure this is obvious for most, but I just discovered this.

 Using one browser (browser A) I can access one of my pages and create a
 cookie with a user input value.

 Then using a different browser (browser B), I can access the same page
 and create another cookie with another user value.

 Now, it would seem to me that I shouldn't have two cookies with the same
 name both having different contents, but that's exactly what I've found
 -- for browser A will produce one value and browser B will produce
 another value.


Can you provide some examples for what you mean?

David


David:

Sure, you can see what I found above by going to:

http://xn--ovg.com

and creating a cookie.

Then do the same thing again, but this time with a different browser 
and different value.


Then quit each browser and re launch each with this url:

http://xn--ovg.com/cookie/getcookie.php

You will find that each browser reports ONLY the cookie you left with it.

It's kind of neat actually.

And in retrospection, I guess that this is the only way it could work 
considering that each browser has it's own way of handling cookies. I 
just never realized it before.


tedd

--

http://sperling.com/

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



RE: [PHP] Use of Ampersand in php

2006-01-23 Thread Richard Correia
Hey,

Check out this example at famous http://www.weberdev.com

http://www.weberdev.com/get_example-3871.html

Let me know if you need more information.

Thanks,
Richard

-Original Message-
From: Nirmalya Lahiri [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 23, 2006 8:34 AM
To: php-general@lists.php.net
Subject: [PHP] Use of Ampersand in php

Hi everybody,
 Can any one tell me, what is the use of ampersand '' in php? Is it
a pointer operator like 'C' language? Kindly note the example

?php
$a=1;
$b= $a;
$c=$a;
echo $b,$c;
?

 After running this example I got result 1 for both variable $b and
$c. Why so?

--Nirmalya

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



RE: [PHP] Search files in a directory!

2006-01-23 Thread Richard Correia
Hey,

Checkout the following example. This example lists the directory content;
you can do a simple string matching.

http://www.weberdev.com/get_example-1572.html

Thanks,
Richard Correia

-Original Message-
From: Nicholas Couloute [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 23, 2006 6:15 PM
To: php-general@lists.php.net
Subject: [PHP] Search files in a directory!

I want to setup a search box that will search all the filenames in a 
given directory for the keyword provided by the user and display all the 
files that have that keyword? how would I do this? at least the 
searching part?

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



Re: [PHP] phpmyadmin import

2006-01-23 Thread William Stokes
Thanks. Got that one changed to 8Mb.

I ran into another issue though. I'm tryin to import a 2,5 Mb table. 
PhpMyAdmin import ends with fatal error while importing. Here's the error 
message.
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to 
allocate 2247907 bytes) in 
/srv/www/htdocs/phpmyadmin/libraries/read_dump.lib.php on line 23

Something else that needs to be changed? I checked that file but it doesn't 
say much to me...

Thanks Again
-Will


Austin Denyer [EMAIL PROTECTED] kirjoitti 
viestissä:[EMAIL PROTECTED] 

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



RE: [PHP] phpmyadmin import

2006-01-23 Thread Richard Correia
Hey Will,

Following example will give you correct idea where to look.

http://www.weberdev.com/get_example-3688.html

Thanks,
Richard Correia


-Original Message-
From: William Stokes [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 23, 2006 7:08 PM
To: php-general@lists.php.net
Subject: [PHP] phpmyadmin import

Hello,

When importing data from file with phpmyadmin the file max size is 2 048kb. 
Can this be changed to accept larger files?

It would be more convenient to import data to my test DB if this could be 
done via single file export/import.

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



Re: [PHP] phpmyadmin import

2006-01-23 Thread John Nichel

Richard Correia wrote:

Hey Will,

Following example will give you correct idea where to look.

http://www.weberdev.com/get_example-3688.html


Will that take him to the phpMyAdmin site?  ;)

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



[PHP] Using mapping tools via PHP?

2006-01-23 Thread Jay Paulson
I was wondering if anyone has built a php web app that uses google maps,
yahoo maps, and/or mapquest maps.

What I am trying to do is create a web app that if someone inputs their zip
or city and state or address the results will show how far away they are
from one of our stores and have a map to the closest ones.

Thanks for any help!

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



[PHP] POP3 or other servers in php

2006-01-23 Thread Geoff
I'm looking a POP3/IMAP server written in PHP. Or failing that, any 
socket-based sever would help me by being an example I could base my 
own on.

I know there are a million functions, routines and classes for 
talking to POP3/IMAP servers. That is not what I need. I need an 
actual service (or example of one) in PHP, one that listens on a 
port and handles multiple incoming connections. What 'nixers would 
call a daemon.

I've done some RTFM and found quite a lot of interesting stuff in 
the manual and manual comments of the Socket Functions section. 
What I'm now seeking is real-world examples.

Many thanks,

Geoff.

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



Re: [PHP] phpmyadmin import

2006-01-23 Thread Austin Denyer

On Mon, 23 Jan 2006 19:24:57 +0200
William Stokes [EMAIL PROTECTED] wrote:

 Thanks. Got that one changed to 8Mb.
 
 I ran into another issue though. I'm tryin to import a 2,5 Mb table. 
 PhpMyAdmin import ends with fatal error while importing. Here's the
 error message.
 Fatal error: Allowed memory size of 8388608 bytes exhausted (tried
 to allocate 2247907 bytes) in 
 /srv/www/htdocs/phpmyadmin/libraries/read_dump.lib.php on line 23
 
 Something else that needs to be changed? I checked that file but it
 doesn't say much to me...

Check the following entry in your php.ini file:

memory_limit

It's possible you may also need to check this one, too:

post_max_size

Regards,
Ozz.


pgpWM0iEwMeiU.pgp
Description: PGP signature


[PHP] DOM saveHTML() not outputting XHTML Strict

2006-01-23 Thread Chris

Hi,

I have a class which will build, and output, an HTML table. To create 
the internal elements more simply I'm using a DOMDocument, with a root 
element of 'table' then outputting with the -saveHTML() method.


This has worked fine during development, but I've run into a problem. In 
this table I have a drop-down list (select with options). If I want 
to set an option to selected I do this:


$oOption-setAttribute('selected','selected');

Which, unfortunately, outputs as `option selected` instead of  
`option selected=selected`


I need my output HTML to conform to XHTML strict.

Is there any way I can force it to output XHTML Strict compliant tags? I 
guess the theoretically ideal solution would be to have a complete XHTML 
Strict DOMDocument, with my table in the body, then just outputting the 
table portion. I haven't found a way to do that without some nasty 
substr()'s and whatnot.


Is there anyway to specify that a DOMDocument is really a portion of an 
XHTML Strict page, and output that accordingly?


Just for clarity's sake, outputting -saveXML() isn't a real attrictive 
solution because it *always* puts the ?xml ? tag at the front, which I 
definitely do not want.


Thanks,
Chris

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



Re: [PHP] phpmyadmin import

2006-01-23 Thread Paul Scott
On Mon, 2006-01-23 at 13:00 -0500, Austin Denyer wrote:
 Check the following entry in your php.ini file:
 
 memory_limit
 
 It's possible you may also need to check this one, too:
 
 post_max_size

I realise that I may get flamed for this on a PHP list, but, generally
when I import sql files to mysql larger than the PHP seetings can
handle, I would use the mysql command line to do it:

mysql \. /path/to/file.sql

That way, in the case that it is just once off test data, you don't have
to worry about fixing your PHP config later. OTOH if you do a lot of
large imports then it probably is worth your while changing the php.ini
in the ways described in this thread.

--Paul

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



Re: [PHP] Cookie reposted

2006-01-23 Thread tedd

Tedd,

The cookie is being set on the www.xn--ovg.com domain.  The cookie is
being read on xn--ovg.com domain.  This is perceived to be a security
risk, so the cookie isn't sent.

David


???

Interesting -- the first time it's read correctly and the second time 
it's a security risk -- how doe that work?


tedd
--

http://sperling.com/

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



Re: [PHP] Re: security of uploaded gif files

2006-01-23 Thread Gerry Danen
There's a couple of things a person can do.

1. check for .gif extention
2. see if exif_imagetype() returns type IMAGETYPE_GIF
3. see if getimagesize() returns reasonable values and not FALSE
4. check the file content for binary vs text content

Gerry

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



Re: [PHP] Cookie reposted

2006-01-23 Thread Richard Correia
By any chance, you are rewritting it/deleting it?

Thanks
Rich

On 1/24/06, tedd [EMAIL PROTECTED] wrote:

 Tedd,
 
 The cookie is being set on the www.xn--ovg.com domain.  The cookie is
 being read on xn--ovg.com domain.  This is perceived to be a security
 risk, so the cookie isn't sent.
 
 David

 ???

 Interesting -- the first time it's read correctly and the second time
 it's a security risk -- how doe that work?

 tedd
 --

 
 http://sperling.com/

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




[PHP] Something wrong to open PHP

2006-01-23 Thread Ivar Johansson

Hi!
When I've created a .php-file and trying to open it then it's not want
to open. There are no error-messages comes up or something like that,
nothing hapends when I'm trying to open it.
Can you please tell me what's wrong?
Thanks!
//Ivar

_
Hitta rätt på nätet med MSN Search http://search.msn.se/

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



RE: [PHP] Something wrong to open PHP

2006-01-23 Thread Jay Blanchard
[snip]
When I've created a .php-file and trying to open it then it's not want
to open. There are no error-messages comes up or something like that,
nothing hapends when I'm trying to open it.
Can you please tell me what's wrong?
Thanks!
[/snip]

There could be so many things wrong. Create a file and call it phpinfo.php.
In that file put only the following code;

?php

phpinfo();

?

Put that on your server and try to load the page.

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



Re: [PHP] Cookie reposted

2006-01-23 Thread Stut

tedd wrote:

Tedd,

The cookie is being set on the www.xn--ovg.com domain.  The cookie is
being read on xn--ovg.com domain.  This is perceived to be a security
risk, so the cookie isn't sent.

David


???

Interesting -- the first time it's read correctly and the second time 
it's a security risk -- how doe that work?


tedd


www.xn--ovg.com is not the same domain name as xn--ovg.com and the 
browser stores cookies against the domain so when the second request 
goes through on the second domain it does not get passed the cookie set 
on the first domain. If you want more Google for this topic - it's been 
covered to death in the past both here and pretty much everywhere else.


-Stut

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



Re: [PHP] DOM saveHTML() not outputting XHTML Strict

2006-01-23 Thread Steve Clay
Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
 the -saveHTML() method ... outputs as `option selected`
 I need my output HTML to conform to XHTML strict.

Since XHTML is XML, try -saveXML()?

Steve
-- 
http://mrclay.org/

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



RE: [PHP] Something wrong to open PHP

2006-01-23 Thread Jay Blanchard
[snip]
Nope, that didn't work either...
Oh, on the way, I can't find IIS on the computer. And in 
ControllpanelAdd/Remove programAdd/Remove Windows components I can't find 
it either. We've Windows XP Home edition.
Maybe it have something with that to do? Please tell me if you know.
Thanks!
[/snip]

I don't think that XP home has a web server. I suggest that you install
Apache. You can get a complete install at http://www.devside.net

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



Re: [PHP] Cookie reposted

2006-01-23 Thread tedd

By any chance, you are rewritting it/deleting it?

Thanks
Rich


Rich:

I'm definitely not rewriting the cookie, for if I quit the browser 
and return to the url again, the cookie data is still there. It's 
only when I return to the same url a second time that it doesn't 
appear again.


It looks like I'll provide this to you only once per starting your browser.

Maybe this is the way it works, but it's contrary to what I think 
should happen.


tedd




On 1/24/06, tedd [EMAIL PROTECTED] wrote:


 Tedd,
 
 The cookie is being set on the www.xn--ovg.com domain.  The cookie is
 being read on xn--ovg.com domain.  This is perceived to be a security
 risk, so the cookie isn't sent.
 
 David

 ???

 Interesting -- the first time it's read correctly and the second time
 it's a security risk -- how doe that work?

 tedd
 --



 http://sperling.com/

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





--

http://sperling.com/

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



Re: [PHP] Cookie reposted

2006-01-23 Thread Richard Correia
Can you check your temporary internet files for the cookie?

Does that cookie is deleted from the browser cache?

With OS/Webserver/browser you are using?

Thanks
Rich


On 1/24/06, tedd [EMAIL PROTECTED] wrote:

 By any chance, you are rewritting it/deleting it?
 
 Thanks
 Rich

 Rich:

 I'm definitely not rewriting the cookie, for if I quit the browser
 and return to the url again, the cookie data is still there. It's
 only when I return to the same url a second time that it doesn't
 appear again.

 It looks like I'll provide this to you only once per starting your
 browser.

 Maybe this is the way it works, but it's contrary to what I think
 should happen.

 tedd



 On 1/24/06, tedd [EMAIL PROTECTED] wrote:
 
   Tedd,
   
   The cookie is being set on the www.xn--ovg.com domain.  The cookie is
   being read on xn--ovg.com domain.  This is perceived to be a security
   risk, so the cookie isn't sent.
   
   David
 
   ???
 
 


Re: [PHP] Adventures in Cookies

2006-01-23 Thread Chris Shiflett

Austin Denyer wrote:

This is a function of the way cookies work, and is not a php issue.


Exactly. This is similar to how you can bookmark a page in one browser, 
and it won't be in another browser's bookmarks. There's nothing that 
says browsers should all use shared resources for persistent data.


Chris

--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/

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



Re: [PHP] DOM saveHTML() not outputting XHTML Strict

2006-01-23 Thread Chris

Steve Clay wrote:


Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
 


the -saveHTML() method ... outputs as `option selected`
I need my output HTML to conform to XHTML strict.
   



Since XHTML is XML, try -saveXML()?

Steve
 

I've tried that, and it suits my purposes except for the fact that it 
always outputs the ?xml ? tag in the front, which I can't have.


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



Re: [PHP] DOM saveHTML() not outputting XHTML Strict

2006-01-23 Thread Michael Crute
On 1/23/06, Chris [EMAIL PROTECTED] wrote:
 Steve Clay wrote:
 Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
 
 the -saveHTML() method ... outputs as `option selected`
 I need my output HTML to conform to XHTML strict.
 
 Since XHTML is XML, try -saveXML()?
 
 Steve
 
 I've tried that, and it suits my purposes except for the fact that it
 always outputs the ?xml ? tag in the front, which I can't have.

Why? XHTML is technically XML which requires a xml declaration. In any
case it is trivial to write a script that generates the files as XML
and strips off the first line of the file.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] DOM saveHTML() not outputting XHTML Strict

2006-01-23 Thread Jay Paulson
I don't know much about the -saveXML() method but after reading the PHP
manual why can't you just do something like this:

$xhtml = $dom-saveXML();

// strip out the ?xml and ?
$html = str_replace(?xml, , $html);
$html = str_replace(?, , $html);

Would that even work?




On 1/23/06 2:52 PM, Chris [EMAIL PROTECTED] wrote:

 Steve Clay wrote:
 
 Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
  
 
 the -saveHTML() method ... outputs as `option selected`
 I need my output HTML to conform to XHTML strict.

 
 
 Since XHTML is XML, try -saveXML()?
 
 Steve
  
 
 I've tried that, and it suits my purposes except for the fact that it
 always outputs the ?xml ? tag in the front, which I can't have.

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



Re: [PHP] DOM saveHTML() not outputting XHTML Strict

2006-01-23 Thread Jay Paulson
ACK!  Of course I put errors in the code.  But I just read if you want to
strip out the first line that would be easy.  Just use a regular expression
and take it out. :)




On 1/23/06 3:23 PM, Jay Paulson [EMAIL PROTECTED] wrote:

 I don't know much about the -saveXML() method but after reading the PHP
 manual why can't you just do something like this:
 
 $xhtml = $dom-saveXML();
 
 // strip out the ?xml and ?
 $html = str_replace(?xml, , $html);
 $html = str_replace(?, , $html);
 
 Would that even work?
 
 
 
 
 On 1/23/06 2:52 PM, Chris [EMAIL PROTECTED] wrote:
 
 Steve Clay wrote:
 
 Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
  
 
 the -saveHTML() method ... outputs as `option selected`
 I need my output HTML to conform to XHTML strict.

 
 
 Since XHTML is XML, try -saveXML()?
 
 Steve
  
 
 I've tried that, and it suits my purposes except for the fact that it
 always outputs the ?xml ? tag in the front, which I can't have.

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



[PHP] Testing

2006-01-23 Thread Ray Hauge
Sorry to kind of spam the list, but I recently switched email programs and 
my posts haven't been making it to the list.  This is just a test... please 
ignore it :)

Thanks,
Ray

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



[PHP] RE: exec php.exe in windows

2006-01-23 Thread Dave Kennedy
Env: IIS, Windows XP, PHP 4.3.10 (cgi-fcgi)
 
exec('c:\php\php -q Balance.php export=all branch=branch
month=month
login=admin password=admin  export/Balance.html');
 
This command works in Linux when launched by an HTTP server.
In Windows it works from the command line but hangs when launched from
an HTTP server 
A cmd and 2 php processes are running in the Windows Task Manager
 
On Windows, it seems that the php process is waiting for input 
Is there a way to log or track what the php process is doing?
 
 


Re: [PHP] Can PHP works with telnet?

2006-01-23 Thread Michael Crute
On 1/22/06, HoWang Wang [EMAIL PROTECTED] wrote:
 Hi all,

 Recently I got a job to write a PHP webpage to display some infomation
 which have to obtain from telnet. Telnet is the only way to query the
 software. I have made a quick search on php.net but I can't found amy
 extension support telnet. Is there any way to do so? Or it is impossible
 with PHP but can be done with external binaries?
 Please help, thanks.

 HoWang Wong

http://www.google.com/search?q=php+telnet

And remember, if all else fails you can use sockets directly to do
what you want.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] Adventures in Cookies

2006-01-23 Thread tedd

Austin Denyer wrote:

This is a function of the way cookies work, and is not a php issue.


Exactly. This is similar to how you can bookmark a page in one 
browser, and it won't be in another browser's bookmarks. There's 
nothing that says browsers should all use shared resources for 
persistent data.


Chris


You said:

There's nothing that says browsers should all use shared resources 
for persistent data.


Exactly! There is *nothing* that says that -- and that was my point 
in asking. If php is to store cookies, then how the data are stored, 
and by what means the data are retrieved, should be reasonable topics 
for a php inquiry, right?


Your bookmark example illustrates the issue very well -- thanks.

tedd

--

http://sperling.com/

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



Re: [PHP] Using mapping tools via PHP?

2006-01-23 Thread Lester Caine

Jay Paulson wrote:


I was wondering if anyone has built a php web app that uses google maps,
yahoo maps, and/or mapquest maps.

What I am trying to do is create a web app that if someone inputs their zip
or city and state or address the results will show how far away they are
from one of our stores and have a map to the closest ones.

Thanks for any help!


http://www.bitweaver.org/wiki/GmapPackage
Some useful links even if you don't go with the framework
( There is also a Mapserver client package )

--
Lester Caine
-
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.

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



Re: [PHP] Cookie reposted [Solved]

2006-01-23 Thread tedd

tedd wrote:

Tedd,

The cookie is being set on the www.xn--ovg.com domain.  The cookie is
being read on xn--ovg.com domain.  This is perceived to be a security
risk, so the cookie isn't sent.

David


???

Interesting -- the first time it's read correctly and the second 
time it's a security risk -- how doe that work?


tedd


www.xn--ovg.com is not the same domain name as xn--ovg.com and the 
browser stores cookies against the domain so when the second request 
goes through on the second domain it does not get passed the cookie 
set on the first domain. If you want more Google for this topic - 
it's been covered to death in the past both here and pretty much 
everywhere else.


-Stut


Ahhh, I see now. Regardless of if it's been beat to death, or not, my 
question wasn't IF there was a difference between a domain w/o www, 
but rather WHY my cookie wasn't working as I expected.


I wasn't aware of the sporadic www prefix addition to my url's at 
that site. I didn't notice that sometimes my url's would have the 
www prefix and other times they wouldn't. When they did have the 
www, the cookie would work and when they didn't, it wouldn't work. 
It was confusing, at least for me.


In any event, many thanks to all for pointing that difference out to 
me. I feel a lot better about cookies now.


Thanks.

tedd

--

http://sperling.com/

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



[PHP] wrapping anchor tags around a URL

2006-01-23 Thread Richard K Miller
I wrote a little function to put anchor tags around a URL.  We're  
using it to make URL's in paragraphs of text linkable:


function link_the_links($s) {
return preg_replace('@(http://[^\s]+)@sm', 'a href=$1$1/a', $s);
}

Its only flaw (besides a goofy name) is that if a link comes at the  
end of a sentence, right before the period, the period ends up in the  
link, thus breaking the link.  I've got to somehow ignore the  
trailing period if it is present.


Any ideas?

Richard K Miller

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



[PHP] Re: security of uploaded gif files

2006-01-23 Thread Gustavo Narea

Hi, James.

James Benson wrote:
Even if you can embed PHP in a GIF it would still need to be executed by 
PHP as PHP code, would PHP actually execute that file when it looks like 
an image, I would think PHP would output an error?


Unless you include/require or eval() its content, PHP won't execute it.


More importantly though, you should be checking the file extension of 
uploaded files to make sure it is only a .gif


I can make a javascript file with a .gif extension, actually.

Take a look at exif_imagetype().

Regards.
--
Gustavo Narea.
PHP Documentation - Spanish Translation Team.
Valencia, Venezuela.

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



Re: [PHP] Re: security of uploaded gif files

2006-01-23 Thread Gustavo Narea

Hi, Gerry.

Gerry Danen wrote:

There's a couple of things a person can do.

1. check for .gif extention
2. see if exif_imagetype() returns type IMAGETYPE_GIF
3. see if getimagesize() returns reasonable values and not FALSE
4. check the file content for binary vs text content


It's enough to know whether it's an image and has a reasonable size. 
What if there is no .gif extension? Rename the file.


I think the last step makes no sense.

Regards.
--
Gustavo Narea.
PHP Documentation - Spanish Translation Team.
Valencia, Venezuela.

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



[PHP] Very good jobs site script?

2006-01-23 Thread Denis L. Menezes
Hi friends.

There are so many job site scripts out there, so cannot decide.

Can anyone suggest a great software?

Thanks
Denis 

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



[PHP] Custom Usort Function

2006-01-23 Thread Matt Palermo
I'm try to sort a list of items using a usort function.  Basically, I want 
it to sort in this order:

Numbers (0-9)
Letters (Aa-Zz)
Other (anything else)

To explain a little further, I want anything that starts with a number to 
show up first in the sorted list, then anything that starts with a letter, 
and finally anything that starts with some other character.  My usort 
function I'm using now gives me results close to this, but it sorts it as 
follows (which is wrong for what I need):

Numbers (0-9)
Other (anything else)
Letters (Aa-Zz)

They are all sorted properly alphabetically, but not in the group order that 
I need them in.  Here is the usort function I'm using right now:


function myUsort($x, $y)
 {
  if(strtolower($x) == strtolower($y)) return 0;
  if(strtolower($x)  strtolower($y)) return -1;
  return 1;
 }

As I stated above, this provides me with the proper alphabetical results, 
but I need it tweaked.  Basically this function will give a sorted list like 
this:

007
90210
__underscore
abra-cadabra
Zebra

But I need the function to provide a sorted list like this:

007
90210
abra-cadabra
Zebra
__underscore


Anyone know what I need to do to get these results?  Please let me know.

Thanks,

Matt Palermo
http://sweetphp.com

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



[PHP] Reference Notices -- Urgent

2006-01-23 Thread Todd Brown

I'm getting the following notices:

Notice: Only variables should be assigned by reference in 
Notice: Only variable references should be returned by reference in 

The code in question comes from PayPal (their CC processing API,) so 
modifying it to correct the reference issues is *not* an option.


On the actual implementation server (PHP 4.4.1), I am not receiving 
these errors.  On my test server (also 4.4.1), I am.  I have run 
phpinfo() on both servers and carefully compared the output; as far as I 
can tell they are configured identically.  I really need to be able to 
successfully run this code on my test server, and I am now baffled as to 
how to eliminate these notices.  Both servers have the same PHP version 
and configuration; why are they behaving differently?


I have searched and searched for an answer to this, and need help urgently.

 Sincerely,
   Todd Brown

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



Re: [PHP] Adventures in Cookies

2006-01-23 Thread Gerry Danen
After some googling, it's a browser thing, not a php thing, as Austin
pointed out. There are just rules (well, suggestions maybe) to be
aware of.

Are we flogging a dead horse here?


On 1/23/06, tedd [EMAIL PROTECTED] wrote:
 Austin Denyer wrote:
 This is a function of the way cookies work, and is not a php issue.

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



[PHP] Can't printout class variable

2006-01-23 Thread Scott Gunn

This should be simple.  What am I doing wrong?

Here is the code that is failing:

$user = $_SESSION['user'];
print_r($user);
echo Welcome  . $user-firstName;

The print_r command prints out:

__PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] = User 
[isLoggedIn] = 1 [lastName] = Gunn [firstName] = Scott )


But the $user-firstName method doesn't return anything.  Here is the 
class declaration:


?php
class User
{
public $isLoggedIn = false;
public $lastName = ;
public $firstName = ;
}
?

This fails after a redirect, but it's not a problem with losing the 
session variables since the print_r command does print out everything 
ok.  However, the same code does work before the redirect (and print_r 
doesn't say Incomplete_Class it says the correct class name).  I am 
redirecting to a relative path on the same server.


Here is my redirect function:
function redirect($url)
{
session_write_close();
header(Location: $url);
exit;
}

I'm pretty new to PHP so it's probably something simple.  Go easy on me!

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



Re: [PHP] Reference Notices -- Urgent

2006-01-23 Thread Richard Correia
Hey Todd,

You need to check the setting of error reporting in php.ini file.
http://www.weberdev.com/Manuals/PHP/ref.errorfunc.html

Thanks
Richard



On 1/24/06, Todd Brown [EMAIL PROTECTED] wrote:

 I'm getting the following notices:

 Notice: Only variables should be assigned by reference in 
 Notice: Only variable references should be returned by reference in 

 The code in question comes from PayPal (their CC processing API,) so
 modifying it to correct the reference issues is *not* an option.

 On the actual implementation server (PHP 4.4.1), I am not receiving
 these errors.  On my test server (also 4.4.1), I am.  I have run
 phpinfo() on both servers and carefully compared the output; as far as I
 can tell they are configured identically.  I really need to be able to



Re: [PHP] Can't printout class variable

2006-01-23 Thread Sumeet

Scott Gunn wrote:

This should be simple.  What am I doing wrong?

Here is the code that is failing:

$user = $_SESSION['user'];
print_r($user);
echo Welcome  . $user-firstName;

The print_r command prints out:

__PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] = User 
[isLoggedIn] = 1 [lastName] = Gunn [firstName] = Scott )




try
$user = (User)$_SESSION['user'];
rest remains the same.

--
Sumeet Shroff
http://www.prateeksha.com
Web Design and Ecommerce Development, Mumbai India

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



Re: [PHP] Reference Notices -- Urgent

2006-01-23 Thread Todd Brown
Thanks, Richard, that solved the problem.  I knew it was something like 
that, but was just running out of time!  I appreciate your help.


Cheers,
  Todd

Richard Correia wrote:

Hey Todd,

You need to check the setting of error reporting in php.ini file.
http://www.weberdev.com/Manuals/PHP/ref.errorfunc.html

Thanks
Richard



On 1/24/06, Todd Brown [EMAIL PROTECTED] wrote:

I'm getting the following notices:

Notice: Only variables should be assigned by reference in 
Notice: Only variable references should be returned by reference in 

The code in question comes from PayPal (their CC processing API,) so
modifying it to correct the reference issues is *not* an option.

On the actual implementation server (PHP 4.4.1), I am not receiving
these errors.  On my test server (also 4.4.1), I am.  I have run
phpinfo() on both servers and carefully compared the output; as far as I
can tell they are configured identically.  I really need to be able to





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



[PHP] Help with getting PHP to see Pear.

2006-01-23 Thread Payne
Hi, I just installed SuSE 10 and I am having a problem with my phpnuke 
site and my maia site. PHPNUKE gives me this error...


*Warning*: main(db/mysql.php): failed to open stream: No such file or 
directory in */srv/www/htdocs/bse/db/db.php* on line *53*


*Warning*: main(): Failed opening 'db/mysql.php' for inclusion 
(include_path='/usr/share/php') in */srv/www/htdocs/bse/db/db.php* on 
line *53*


*Fatal error*: Cannot instantiate non-existent class: sql_db in 
*/srv/www/htdocs/bse/db/db.php* on line *86


But if I copy my old php.ini from 9.1 it works just fine.

One maia, it says that it not install, I took a look at my phpinfo and I 
did see this


*'./configure' '--prefix=/usr' '--datadir=/usr/share/php' 
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share' 
'--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib' 
'--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' 
'--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' 
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' 
'--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli' 
'--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork' 
'i586-suse-linux'


How can I get php to see pear, it is installed.  I have install modules 
with pear for maia and horde but neither seem to see pear.


Also I know that since 4.4.0 BC Math library is included, maia saying it 
not.



Payne

   
PEAR *FAILED*: Not installed. The PEAR extension is required by 
several other PHP extensions that Maia needs. See this page 
http://pear.php.net/ for more information about downloading and 
installing PEAR.

PEAR::Mail_Mime *SKIPPED*: Requires PEAR
PEAR::DB *SKIPPED*: Requires PEAR
PEAR::DB_Pager *SKIPPED*: Requires PEAR
PEAR::Net_Socket *SKIPPED*: Requires PEAR
PEAR::Net_SMTP *SKIPPED*: Requires PEAR
PEAR::Auth_SASL *SKIPPED*: Requires PEAR
PEAR::Net_IMAP *SKIPPED*: Requires PEAR
PEAR::Net_POP3 *SKIPPED*: Requires PEAR
PEAR::Log *SKIPPED*: Requires PEAR
IMAP library *OK*: 2004
LDAP library *OK*
MCrypt library *OK*: = 2.4.x with Blowfish and CBC
BC math library *FAILED*: Not installed. This PHP extension is 
required in order to decode certain types of URLs. See this page 
http://www.php.net/bc/ for more information about recompiling PHP with 
the --enable-bcmath flag.

gd graphics library *OK*: 2.0 or higher

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



[PHP] Help with getting PHP to see Pear.

2006-01-23 Thread Payne
Hi, I just installed SuSE 10 and I am having a problem with my phpnuke 
site and my maia site. PHPNUKE gives me this error...


*Warning*: main(db/mysql.php): failed to open stream: No such file or 
directory in */srv/www/htdocs/bse/db/db.php* on line *53*


*Warning*: main(): Failed opening 'db/mysql.php' for inclusion 
(include_path='/usr/share/php') in */srv/www/htdocs/bse/db/db.php* on 
line *53*


*Fatal error*: Cannot instantiate non-existent class: sql_db in 
*/srv/www/htdocs/bse/db/db.php* on line *86


But if I copy my old php.ini from 9.1 it works just fine.

One maia, it says that it not install, I took a look at my phpinfo and I 
did see this


*'./configure' '--prefix=/usr' '--datadir=/usr/share/php' 
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share' 
'--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib' 
'--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' 
'--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' 
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' 
'--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli' 
'--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork' 
'i586-suse-linux'


How can I get php to see pear, it is installed.  I have install modules 
with pear for maia and horde but neither seem to see pear.


Also I know that since 4.4.0 BC Math library is included, maia saying it 
not.



Payne


PEAR 	*FAILED*: Not installed. The PEAR extension is required by several 
other PHP extensions that Maia needs. See this page 
http://pear.php.net/ for more information about downloading and 
installing PEAR.

PEAR::Mail_Mime *SKIPPED*: Requires PEAR
PEAR::DB*SKIPPED*: Requires PEAR
PEAR::DB_Pager  *SKIPPED*: Requires PEAR
PEAR::Net_Socket*SKIPPED*: Requires PEAR
PEAR::Net_SMTP  *SKIPPED*: Requires PEAR
PEAR::Auth_SASL *SKIPPED*: Requires PEAR
PEAR::Net_IMAP  *SKIPPED*: Requires PEAR
PEAR::Net_POP3  *SKIPPED*: Requires PEAR
PEAR::Log   *SKIPPED*: Requires PEAR
IMAP library*OK*: 2004
LDAP library*OK*
MCrypt library  *OK*: = 2.4.x with Blowfish and CBC
BC math library 	*FAILED*: Not installed. This PHP extension is required 
in order to decode certain types of URLs. See this page 
http://www.php.net/bc/ for more information about recompiling PHP with 
the --enable-bcmath flag.

gd graphics library *OK*: 2.0 or higher

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



RE: [PHP] Help with getting PHP to see Pear.

2006-01-23 Thread Albert
Payne wrote:
 How can I get php to see pear, it is installed.  I have install modules 
 with pear for maia and horde but neither seem to see pear.

I'm running SuSE 9.3 and had to add /usr/share/php to the include path in
/etc/php.ini to be able to use the installed PEAR extensions.

To enable bcmath I had to uncomment the extension=bcmath.so line in
/etc/php.ini 

Check that phpinfo() outputs bcmath.

Albert

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.22/238 - Release Date: 2006/01/23
 

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