php-general Digest 11 Jun 2008 23:30:47 -0000 Issue 5509

2008-06-11 Thread php-general-digest-help

php-general Digest 11 Jun 2008 23:30:47 - Issue 5509

Topics (messages 275227 through 275239):

Re: XML DOM problem with getAttribute(string)
275227 by: dominussuus.gmail.com
275228 by: Rob Richards

Re: regular expression to find body text in mobile
275229 by: Richard Heyes
275230 by: Yui Hiroaki
275233 by: Bastien Koert
275234 by: Nitsan Bin-Nun

Re: About HTML  CSS
275231 by: Boyd, Todd M.

Re: printer problem with network shared printers
275232 by: Dan Shirah

error Failed opening for inclusion
275235 by: Lou Baccari

Forum coded in PHP with mail and news gateway
275236 by: Michelle Konzack

creating zip's with php - high memory usage
275237 by: Aaron Axelsen

Command-line PHP memory limit
275238 by: Rene Fournier

Re: Problem with output_buffering directive in cli
275239 by: Nathan Nobbe

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
Thank you, Rob,

Unfortunately, that didn't work, either (though I'll keep it in mind).
 The returned string is still empty.

I also unsuccessfully fetched the 'xmlns' attribute using
getAttribute().  Interestingly, although hasAttributes(void) returns
true, hasAttribute('xmlns'), and hasAttribute(' xml:lang') both return
false.

On 11/06/2008, Rob Richards [EMAIL PROTECTED] wrote:
 Borden Rhodes wrote:
 I'm having a pig of a time trying to figure this one out:  I have an
 XHTML document which I've loaded into a DOMDocument because I want to
 add more tags to it.  However, since I live in a bilingual country, I
 want to get the document's xml:lang attribute so I know what language
 to add my new tags in.

 I want to write

 $lang = $page-documentElement-getAttribute('xml:lang');
 OR
 $lang = $page-documentElement-getAttributeNS('xml', 'lang');

 but both of these return empty strings, indicating that it cannot find
 the xml:lang attribute.  And yet,
 $page-documentElement-hasAttributes() returns true and

 $page-documentElement-attributes-getNamedItem('xml:lang')-nodeValue;

 works correctly.  So why doesn't my preferred code?

 The xml prefix is bound to the http://www.w3.org/XML/1998/namespace
 namespace.

 $lang =
 $page-documentElement-getAttributeNS('http://www.w3.org/XML/1998/namespace',
 'lang');

 Rob

---End Message---
---BeginMessage---
You might want to put a link to a complete example because 
$page-documentElement-getAttributeNS('http://www.w3.org/XML/1998/namespace', 
'lang'); is how you access it.



Rob


[EMAIL PROTECTED] wrote:

Thank you, Rob,

Unfortunately, that didn't work, either (though I'll keep it in mind).
 The returned string is still empty.

I also unsuccessfully fetched the 'xmlns' attribute using
getAttribute().  Interestingly, although hasAttributes(void) returns
true, hasAttribute('xmlns'), and hasAttribute(' xml:lang') both return
false.

On 11/06/2008, Rob Richards [EMAIL PROTECTED] wrote:

Borden Rhodes wrote:

I'm having a pig of a time trying to figure this one out:  I have an
XHTML document which I've loaded into a DOMDocument because I want to
add more tags to it.  However, since I live in a bilingual country, I
want to get the document's xml:lang attribute so I know what language
to add my new tags in.

I want to write

$lang = $page-documentElement-getAttribute('xml:lang');
OR
$lang = $page-documentElement-getAttributeNS('xml', 'lang');

but both of these return empty strings, indicating that it cannot find
the xml:lang attribute.  And yet,
$page-documentElement-hasAttributes() returns true and

$page-documentElement-attributes-getNamedItem('xml:lang')-nodeValue;

works correctly.  So why doesn't my preferred code?

The xml prefix is bound to the http://www.w3.org/XML/1998/namespace
namespace.

$lang =
$page-documentElement-getAttributeNS('http://www.w3.org/XML/1998/namespace',
'lang');

Rob



---End Message---
---BeginMessage---

Doese any know how to find text in mobile using Regular Expression?
I am using php.


Mobile what?

--
Richard Heyes

Employ me:
http://www.phpguru.org/cv

++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++
---End Message---
---BeginMessage---
Ooops!
It it mobile mobile phone!

Regards,
Yui

2008/6/11 Richard Heyes [EMAIL PROTECTED]:
 Doese any know how to find text in mobile using Regular Expression?
 I am using php.

 Mobile what?

 --
 Richard Heyes

Employ me:
 http://www.phpguru.org/cv

 ++
 | Access SSH with a Windows mapped drive |
 |http://www.phpguru.org/sftpdrive|
 ++

 --
 PHP General Mailing List (http://www.php.net/)
 

[PHP] printer problem with network shared printers

2008-06-11 Thread Kasun Denepitiyage

hi
im using the winXp  as my server OS and i want to release a printout to 
client local printer. so i tried to use that shred printer using php 
printer_open() function but i coudnt. so please provide me the best 
solution for this issue. i can use client side script but i need server 
side solution.



--
This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system. E-mail transmission cannot be guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents of this 
message, which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version. Pan Asia Banking Corporation Plc. 
450, Galle Road, Colombo 3, Sri Lanka. www.pabcbank.com


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



Re: [PHP] Class Type Casting

2008-06-11 Thread Leurent Francois
 One could ask if it would just pass to
 the constructor, but it doesn't.  I don't know if there's a technical 
 reason
 for that or if just no one implemented it, but the short answer is The
 language doesn't do that.

That's what i was asking about, when trying to cast something into a non 
native type ( ie a class ), just fire the constructor. Would'nt it be great 
?

$myvar=(array) somefunc();
$myvar=(myarrayextented) somefunc();

( what should be exactly the same as  )
$myvar=new myarrayextented(somefunc());

But with a lot more of coolness ! 



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



[PHP] XML DOM problem with getAttribute(string)

2008-06-11 Thread Borden Rhodes
Hullo!

I'm having a pig of a time trying to figure this one out:  I have an
XHTML document which I've loaded into a DOMDocument because I want to
add more tags to it.  However, since I live in a bilingual country, I
want to get the document's xml:lang attribute so I know what language
to add my new tags in.

I want to write

$lang = $page-documentElement-getAttribute('xml:lang');
OR
$lang = $page-documentElement-getAttributeNS('xml', 'lang');

but both of these return empty strings, indicating that it cannot find
the xml:lang attribute.  And yet,
$page-documentElement-hasAttributes() returns true and

$page-documentElement-attributes-getNamedItem('xml:lang')-nodeValue;

works correctly.  So why doesn't my preferred code?

With thanks,

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



[PHP] Re: Build and Deployment Process

2008-06-11 Thread Colin Guthrie

VamVan wrote:

Hello All,

What is the best method to build and deploy php scripts along the different
environments? You can talk about rpm's and stuff

My specific scenario is

Step1:

Developer checks code in to perforce (repo)

Step 2:

Then I need to upgrade my integration instance.

Step 3:

Upgrade QA instance

Step 4:

Upgrade staging Server

Step 5:

Upgrade production machines

What would be the specific build mechanism that I can use for such kind of
environments? I also have db scripts that might alter schema.

Please provide me samples of any scripts that you might have written to
achieve this kid of structure. Any suggestions or scripts will be highly
appreciated.


Personally, I use various branches in our repo to do this kind of roll 
out. I have various (simple) scripts that do all the updating on the 
various environments and it's usually just a matter of switching to a 
different branch.


It kind of depends whether all of your productions environments are 
under your control or not. If they are then you can do a kind of direct 
access to your repo on them (security considerations aside).


On production, I personally do a pull from the repop to an offline area 
on a master production server, do rsync dry-runs to online areas (to 
get the disc cache all warmed up) to each production server (there can 
be more than one!) and then do a quick: disable, rysnc, update, enable 
run to do the final deployment.


If we know there are no race type issues in our deployment we can opt to 
avoid the disable/enable bit of it and just deploy it live.


Not much in the way of attached scripts but that how I do it and it 
works pretty well :)


As a side note, if you have larger load sites, you'll probably be doing 
some caching cleverness with APC (or similar), in which case you'll 
probably want to invalidate some caches before update. In order to 
prevent spike loading upon enabling again, you may also want to do some 
kind of priming of the caches before opening it all to the public.


Col


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



[PHP] regular expression to find body text in mobile

2008-06-11 Thread Yui Hiroaki
Doese any know how to find text in mobile using Regular Expression?
I am using php.

Regards,
Yui

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



[PHP] Re: XML DOM problem with getAttribute(string)

2008-06-11 Thread Rob Richards

Borden Rhodes wrote:

I'm having a pig of a time trying to figure this one out:  I have an
XHTML document which I've loaded into a DOMDocument because I want to
add more tags to it.  However, since I live in a bilingual country, I
want to get the document's xml:lang attribute so I know what language
to add my new tags in.

I want to write

$lang = $page-documentElement-getAttribute('xml:lang');
OR
$lang = $page-documentElement-getAttributeNS('xml', 'lang');

but both of these return empty strings, indicating that it cannot find
the xml:lang attribute.  And yet,
$page-documentElement-hasAttributes() returns true and

$page-documentElement-attributes-getNamedItem('xml:lang')-nodeValue;

works correctly.  So why doesn't my preferred code?


The xml prefix is bound to the http://www.w3.org/XML/1998/namespace 
namespace.


$lang = 
$page-documentElement-getAttributeNS('http://www.w3.org/XML/1998/namespace', 
'lang');


Rob

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



Re: [PHP] Problem with output_buffering directive in cli

2008-06-11 Thread Mike Burba
Thanks for ideas, Nathan.

 dunno if this was a typo on your part, but shouldnt it be,
 ini_get(output_buffering) ?

yes...was getting tired last night.  but it is correct in the code.

 you might not be getting your settings from the ini file you think you are,
 or there could be another one in the way.  just for the hell of it, why not
 give

 php --ini

This is a great idea...and I tried this but I'm using php 5.1.x and
--ini flag is not available until 5.2.something. sigh

 also, this brings up the point of setting local values on the cli.  im not
 sure how to do it.  w/ apache, you can supply a .htaccess file which allows
 you to alter values in the 'local' column of the phpinfo() output.  anyone
 know how to do it on the cli ?

Exactly my thoughts...anyone out there know?

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



[PHP] Re: XML DOM problem with getAttribute(string)

2008-06-11 Thread dominussuus
Thank you, Rob,

Unfortunately, that didn't work, either (though I'll keep it in mind).
 The returned string is still empty.

I also unsuccessfully fetched the 'xmlns' attribute using
getAttribute().  Interestingly, although hasAttributes(void) returns
true, hasAttribute('xmlns'), and hasAttribute(' xml:lang') both return
false.

On 11/06/2008, Rob Richards [EMAIL PROTECTED] wrote:
 Borden Rhodes wrote:
 I'm having a pig of a time trying to figure this one out:  I have an
 XHTML document which I've loaded into a DOMDocument because I want to
 add more tags to it.  However, since I live in a bilingual country, I
 want to get the document's xml:lang attribute so I know what language
 to add my new tags in.

 I want to write

 $lang = $page-documentElement-getAttribute('xml:lang');
 OR
 $lang = $page-documentElement-getAttributeNS('xml', 'lang');

 but both of these return empty strings, indicating that it cannot find
 the xml:lang attribute.  And yet,
 $page-documentElement-hasAttributes() returns true and

 $page-documentElement-attributes-getNamedItem('xml:lang')-nodeValue;

 works correctly.  So why doesn't my preferred code?

 The xml prefix is bound to the http://www.w3.org/XML/1998/namespace
 namespace.

 $lang =
 $page-documentElement-getAttributeNS('http://www.w3.org/XML/1998/namespace',
 'lang');

 Rob


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



Re: [PHP] Problem with output_buffering directive in cli

2008-06-11 Thread Mike Burba
I think I solved this issue by using the -d option on the commandline.

When I use:
php -d output_buffering=On ./filename.php

the local value / active value of output_buffering is correct.

MKB

On Wed, Jun 11, 2008 at 5:54 AM, Mike Burba [EMAIL PROTECTED] wrote:
 Thanks for ideas, Nathan.

 dunno if this was a typo on your part, but shouldnt it be,
 ini_get(output_buffering) ?

 yes...was getting tired last night.  but it is correct in the code.

 you might not be getting your settings from the ini file you think you are,
 or there could be another one in the way.  just for the hell of it, why not
 give

 php --ini

 This is a great idea...and I tried this but I'm using php 5.1.x and
 --ini flag is not available until 5.2.something. sigh

 also, this brings up the point of setting local values on the cli.  im not
 sure how to do it.  w/ apache, you can supply a .htaccess file which allows
 you to alter values in the 'local' column of the phpinfo() output.  anyone
 know how to do it on the cli ?

 Exactly my thoughts...anyone out there know?


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



[PHP] Re: XML DOM problem with getAttribute(string)

2008-06-11 Thread Rob Richards
You might want to put a link to a complete example because 
$page-documentElement-getAttributeNS('http://www.w3.org/XML/1998/namespace', 
'lang'); is how you access it.



Rob


[EMAIL PROTECTED] wrote:

Thank you, Rob,

Unfortunately, that didn't work, either (though I'll keep it in mind).
 The returned string is still empty.

I also unsuccessfully fetched the 'xmlns' attribute using
getAttribute().  Interestingly, although hasAttributes(void) returns
true, hasAttribute('xmlns'), and hasAttribute(' xml:lang') both return
false.

On 11/06/2008, Rob Richards [EMAIL PROTECTED] wrote:

Borden Rhodes wrote:

I'm having a pig of a time trying to figure this one out:  I have an
XHTML document which I've loaded into a DOMDocument because I want to
add more tags to it.  However, since I live in a bilingual country, I
want to get the document's xml:lang attribute so I know what language
to add my new tags in.

I want to write

$lang = $page-documentElement-getAttribute('xml:lang');
OR
$lang = $page-documentElement-getAttributeNS('xml', 'lang');

but both of these return empty strings, indicating that it cannot find
the xml:lang attribute.  And yet,
$page-documentElement-hasAttributes() returns true and

$page-documentElement-attributes-getNamedItem('xml:lang')-nodeValue;

works correctly.  So why doesn't my preferred code?

The xml prefix is bound to the http://www.w3.org/XML/1998/namespace
namespace.

$lang =
$page-documentElement-getAttributeNS('http://www.w3.org/XML/1998/namespace',
'lang');

Rob




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



Re: [PHP] regular expression to find body text in mobile

2008-06-11 Thread Richard Heyes

Doese any know how to find text in mobile using Regular Expression?
I am using php.


Mobile what?

--
Richard Heyes

Employ me:
http://www.phpguru.org/cv

++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++

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



Re: [PHP] regular expression to find body text in mobile

2008-06-11 Thread Yui Hiroaki
Ooops!
It it mobile mobile phone!

Regards,
Yui

2008/6/11 Richard Heyes [EMAIL PROTECTED]:
 Doese any know how to find text in mobile using Regular Expression?
 I am using php.

 Mobile what?

 --
 Richard Heyes

Employ me:
 http://www.phpguru.org/cv

 ++
 | Access SSH with a Windows mapped drive |
 |http://www.phpguru.org/sftpdrive|
 ++

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



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



RE: [PHP] About HTML CSS

2008-06-11 Thread Boyd, Todd M.
 -Original Message-
 From: Alberto García Gómez [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 10, 2008 9:49 PM
 To: PHP General list
 Subject: [PHP] About HTML  CSS
 
 Hi Fellow:
 
 I wonder if there some list about HTML/CSS/JavaScript and Genereal Web
 Design.
 
 Thanks

STFW:

http://www.w3.org/QA/2002/04/valid-dtd-list.html
http://www.w3schools.com/html
http://www.w3schools.com/css
http://www.w3schools.com/js

As far as mailing lists, asking on a PHP mailing list is probably not your best 
bet.


Todd Boyd
Web Programmer



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



Re: [PHP] printer problem with network shared printers

2008-06-11 Thread Dan Shirah
Kasun,

I would suggest using simple Javascript to allow them to print.

Something like:

**THE JAVASCRIPT**

script language=JavaScript
!--
function printWindow() {
 bV = parseInt(navigator.appVersion)
 if (bV = 4) window.print()
}
//--
/script

**PUT THIS ANYWHERE IN YOUR FORM**

table align=center border=0 cellpadding=0 cellspacing=0
width=680
 tr
  td height=13 align=right class=tblheada
href=javascript:printWindow()Print This Page/a/td
 /tr
/table


Re: [PHP] regular expression to find body text in mobile

2008-06-11 Thread Bastien Koert
On Wed, Jun 11, 2008 at 9:43 AM, Yui Hiroaki [EMAIL PROTECTED] wrote:

 Ooops!
 It it mobile mobile phone!

 Regards,
 Yui

 2008/6/11 Richard Heyes [EMAIL PROTECTED]:
  Doese any know how to find text in mobile using Regular Expression?
  I am using php.
 
  Mobile what?
 
  --
  Richard Heyes


You want to search for text that is on a screen on a mobile device? PHP runs
on the server, so it won't be able to manage that.

Can you be more clear about the goal? Help us understand what you want to
do.
-- 

Bastien

Cat, the other other white meat


Re: [PHP] regular expression to find body text in mobile

2008-06-11 Thread Nitsan Bin-Nun
I'm confused.
PHP runs on the server, so it shouldn't be a problem at all to run regex
search/reaplce/match/whatever on mobile phone internet, maybe you are
talking on JS regex?

Nitsan


On 11/06/2008, Yui Hiroaki [EMAIL PROTECTED] wrote:

 Doese any know how to find text in mobile using Regular Expression?
 I am using php.

 Regards,
 Yui

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




[PHP] error Failed opening for inclusion

2008-06-11 Thread Lou Baccari


sorry if I double posted:


Hello,

I'm trying to move my apache server from a Fedora Core 1 with PHP V 
4.3.8 onto a newly built  Centos 5 with PHP 5.1.6, all applications 
installed by rpms.  The www root dir is /projects/proj2/www/html and 
it is a nfs mounted share.


During the installation I had moved all of the contents from the remote 
mount /projects/proj2/www/html to a local disk on the CentOS, I tested 
and I believed I had resolved all issues on the new server.
Now when I changed my httpd.conf to point to the nfs share 
/projects/proj2/www/html my php scripts fail,  even  phpinfo();  
fails.  All errors are identical to the following except for the php 
file name.



*Warning*: Unknown: failed to open stream: Value too large for defined 
data type in *Unknown* on line *0*


*Warning*: Unknown: Failed opening 
'/projects/proj2/www/html/php_info.php' for inclusion 
(include_path='.:/usr/share/pear') in *Unknown* on line *0

* 

Again when I run these same scripts from the local disk I do not 
received any errors.  Any ideas to correcting this problem?


Thanks,

Lou.


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



[PHP] Forum coded in PHP with mail and news gateway

2008-06-11 Thread Michelle Konzack
Hello,

because it is actual for me while having  some  problems  with  Ubuntu's
LAUNCHPAD (does not support threating) I like to know, whether there  is
a light Forum software written in PHP availlable.

It should support:

1)  PostgreSQL  (my own database)
2)  MySQL   (my current hosting provider offer it only)
3)  Threating
4)  Gateway to mailinglist including threating
5)  Gateway to usenet including threating
6)  Subscriber only
7)  Scanning for SPAM  :-D

I like to install it on my devel website  and  have  the  need  for  a
category for each software package I have.  So it is  not  a  big  thing
with currently 61 packages bu maybe increase to arround 150.

My current mailinglist software is courier-mlm which works nicely.

Any suggestions?

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
+49/177/935194750, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


[PHP] creating zip's with php - high memory usage

2008-06-11 Thread Aaron Axelsen

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I am working on a script that will take a few folders, copy them to a 
temp location, and then create a zipfile.  The problem i'm running into 
is that some of these zips are upwards of 300mb, and when I use exec to 
execute the zip function, or use the ZipArchive extension, the php 
memory usages increases - close to 300mb.  Is there any way to get 
around this spike of memory usage from within php?  Or is there a better 
way alltogether to handle this?  I'm open to suggestions!


- --
Aaron Axelsen
[EMAIL PROTECTED]

Great hosting, low prices.  Modevia Web Services LLC -- 
http://www.modevia.com

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIUEYuuucONIvD0AMRAnhCAJ9BaE1jA0VSmhxs9o7EnCGmOxUbdgCglbCs
iWFyJr5MVW5rBfmAB8MbSDo=
=oBqU
-END PGP SIGNATURE-


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



[PHP] Command-line PHP memory limit

2008-06-11 Thread Rene Fournier
Is it possible to set a unique memory limit for PHP scripts that are  
run from the command line? (That is, different from what's specified  
in php.ini.)


...Rene



Re: [PHP] Problem with output_buffering directive in cli

2008-06-11 Thread Nathan Nobbe
On Wed, Jun 11, 2008 at 4:35 AM, Mike Burba [EMAIL PROTECTED] wrote:

 I think I solved this issue by using the -d option on the commandline.

 When I use:
 php -d output_buffering=On ./filename.php

 the local value / active value of output_buffering is correct.


kudos, and nice find ;)

-nathan


[PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread Wei, Alice J.
Hi,

  I am currently using a Linux box with Fedora to run my PHP scripts, which I 
have seen in the download page at http://www.php.net/downloads.php that

   We do not distribute UNIX/Linux binaries. Most Linux distributions come with 
PHP these days.

  What I am wondering is, if I can run my scripts by using the command like php 
some_php.php, as long as it does not require me to have it displayed on the web 
page or in need of using a mssql_connect function, it does not give me any 
errors at all. Otherwise, it consistently gives me errors Call to undefined 
function: mysql_connect()

  I can only see the HTML code of the php functions I call within the code at 
the command output in text format, but I cannot see it on the browser.

  Are these two errors related? I tried installing PHP and Apache afterwards, 
but it seems that it is not providing a different message. Have I missed 
something here?

Anything is appreciated.

Alice
==
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
[EMAIL PROTECTED]

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



Re: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread DeadTOm
Do you have php-mysql installed? In ubuntu for php5 the package is 
php5-mysql.


-Allen

Wei, Alice J. wrote:

Hi,

  I am currently using a Linux box with Fedora to run my PHP scripts, which I 
have seen in the download page at http://www.php.net/downloads.php that

   We do not distribute UNIX/Linux binaries. Most Linux distributions come with 
PHP these days.

  What I am wondering is, if I can run my scripts by using the command like php 
some_php.php, as long as it does not require me to have it displayed on the web page or 
in need of using a mssql_connect function, it does not give me any errors at all. 
Otherwise, it consistently gives me errors Call to undefined function: 
mysql_connect()

  I can only see the HTML code of the php functions I call within the code at the command 
output in text format, but I cannot see it on the browser.

  Are these two errors related? I tried installing PHP and Apache afterwards, 
but it seems that it is not providing a different message. Have I missed 
something here?

Anything is appreciated.

Alice
==
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
[EMAIL PROTECTED]

  



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



RE: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread Wei, Alice J.
Hi,

  I have originally commented out all the MS SQL lines in the php.ini files so 
that it supports MS SQL, but that does not seem to work. MySQL? Since I am not 
using that to connect my PHP to, do I still need to install it? By the way, my 
Microsoft SQL server database is on a different Windows machine.

Alice

-Original Message-
From: DeadTOm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:29 PM
To: Wei, Alice J.; php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

Do you have php-mysql installed? In ubuntu for php5 the package is
php5-mysql.

-Allen

Wei, Alice J. wrote:
 Hi,

   I am currently using a Linux box with Fedora to run my PHP scripts, which I 
 have seen in the download page at http://www.php.net/downloads.php that

We do not distribute UNIX/Linux binaries. Most Linux distributions come 
 with PHP these days.

   What I am wondering is, if I can run my scripts by using the command like 
 php some_php.php, as long as it does not require me to have it displayed on 
 the web page or in need of using a mssql_connect function, it does not give 
 me any errors at all. Otherwise, it consistently gives me errors Call to 
 undefined function: mysql_connect()

   I can only see the HTML code of the php functions I call within the code at 
 the command output in text format, but I cannot see it on the browser.

   Are these two errors related? I tried installing PHP and Apache afterwards, 
 but it seems that it is not providing a different message. Have I missed 
 something here?

 Anything is appreciated.

 Alice
 ==
 Alice Wei
 MIS 2009
 School of Library and Information Science
 Indiana University Bloomington
 [EMAIL PROTECTED]




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



Re: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread Greg Maruszeczka
On Wed, 11 Jun 2008 22:03:53 -0400
Wei, Alice J. [EMAIL PROTECTED] wrote:

 Hi,
 
   I am currently using a Linux box with Fedora to run my PHP scripts,
 which I have seen in the download page at
 http://www.php.net/downloads.php that
 
We do not distribute UNIX/Linux binaries. Most Linux distributions
 come with PHP these days.
 
   What I am wondering is, if I can run my scripts by using the
 command like php some_php.php, as long as it does not require me to
 have it displayed on the web page or in need of using a mssql_connect
 function, it does not give me any errors at all. Otherwise, it
 consistently gives me errors Call to undefined function:
 mysql_connect()


This (likely) means you don't have the mysql extension installed. If
you type the following at the command line:

php -m | grep mysql

and nothing prints out, you'll need to install the rpm that
provides mysql-related functions and restart apache.

HTH,

GM

-- 
   
Greg Maruszeczka

http://websagesolutions.com
skype: websage.ca
googletalk: gmarus

Those who are possessed by nothing possess everything.
-- Morihei Ueshiba

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



Re: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread DeadTOm
Otherwise, it consistently gives me errors Call to undefined 
function: mysql_connect()If you're getting an error...


If you're getting this error, there is a line of code in the php script 
that is trying to connect to a mysql database and the mysql extension 
for php is not installed. So php doesn't know this function is supposed 
to do hence, the undefined function error.


I can only see the HTML code of the php functions I call within the 
code at the command output in text format, but I cannot see it on the 
browser.


I'm a little confused about what you mean here. You shouldn't see any 
HTML code in your browser.


Wei, Alice J. wrote:

Hi,

  I have originally commented out all the MS SQL lines in the php.ini files so 
that it supports MS SQL, but that does not seem to work. MySQL? Since I am not 
using that to connect my PHP to, do I still need to install it? By the way, my 
Microsoft SQL server database is on a different Windows machine.

Alice

-Original Message-
From: DeadTOm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:29 PM
To: Wei, Alice J.; php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

Do you have php-mysql installed? In ubuntu for php5 the package is
php5-mysql.

-Allen

Wei, Alice J. wrote:
  

Hi,

  I am currently using a Linux box with Fedora to run my PHP scripts, which I 
have seen in the download page at http://www.php.net/downloads.php that

   We do not distribute UNIX/Linux binaries. Most Linux distributions come with 
PHP these days.

  What I am wondering is, if I can run my scripts by using the command like php 
some_php.php, as long as it does not require me to have it displayed on the web page or 
in need of using a mssql_connect function, it does not give me any errors at all. 
Otherwise, it consistently gives me errors Call to undefined function: 
mysql_connect()

  I can only see the HTML code of the php functions I call within the code at the command 
output in text format, but I cannot see it on the browser.

  Are these two errors related? I tried installing PHP and Apache afterwards, 
but it seems that it is not providing a different message. Have I missed 
something here?

Anything is appreciated.

Alice
==
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
[EMAIL PROTECTED]






  



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



Re: [PHP] Command-line PHP memory limit

2008-06-11 Thread Robert Cummings
On Wed, 2008-06-11 at 23:48 +0200, Rene Fournier wrote:
 Is it possible to set a unique memory limit for PHP scripts that are  
 run from the command line? (That is, different from what's specified  
 in php.ini.)

In your script:

ini_set( 'memory_limit', -1 );

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



RE: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread Wei, Alice J.
Hi,

  Oops, I should have typed mssql_connect() instead of mysql_connect(). But, I 
have just used something like

   ?php echo Hello! ?, which nests around a chunk of HTML, and this only 
gives me the following on the screen:

   html
   headtitleHello/title
body
/body
 /html

 My question is why I could see Hello in the body when I execute this from the 
command line. Do I have to install anything else? Apache is not the thing, is 
it?

Alice

-Original Message-
From: Greg Maruszeczka [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:37 PM
To: php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

On Wed, 11 Jun 2008 22:03:53 -0400
Wei, Alice J. [EMAIL PROTECTED] wrote:

 Hi,

   I am currently using a Linux box with Fedora to run my PHP scripts,
 which I have seen in the download page at
 http://www.php.net/downloads.php that

We do not distribute UNIX/Linux binaries. Most Linux distributions
 come with PHP these days.

   What I am wondering is, if I can run my scripts by using the
 command like php some_php.php, as long as it does not require me to
 have it displayed on the web page or in need of using a mssql_connect
 function, it does not give me any errors at all. Otherwise, it
 consistently gives me errors Call to undefined function:
 mysql_connect()


This (likely) means you don't have the mysql extension installed. If
you type the following at the command line:

php -m | grep mysql

and nothing prints out, you'll need to install the rpm that
provides mysql-related functions and restart apache.

HTH,

GM

--

Greg Maruszeczka

http://websagesolutions.com
skype: websage.ca
googletalk: gmarus

Those who are possessed by nothing possess everything.
-- Morihei Ueshiba

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


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



Re: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread Chris
Wei, Alice J. wrote:
 Hi,
 
   I am currently using a Linux box with Fedora to run my PHP scripts, which I 
 have seen in the download page at http://www.php.net/downloads.php that
 
We do not distribute UNIX/Linux binaries. Most Linux distributions come 
 with PHP these days.
 
   What I am wondering is, if I can run my scripts by using the command like 
 php some_php.php, as long as it does not require me to have it displayed on 
 the web page or in need of using a mssql_connect function, it does not give 
 me any errors at all. Otherwise, it consistently gives me errors Call to 
 undefined function: mysql_connect()
 
   I can only see the HTML code of the php functions I call within the code at 
 the command output in text format, but I cannot see it on the browser.
 
   Are these two errors related? I tried installing PHP and Apache afterwards, 
 but it seems that it is not providing a different message. Have I missed 
 something here?

Some servers have display_errors disabled in their php.ini files and it
only logs errors.

If you add:

error_reporting(E_ALL);
ini_set('display_errors', true);

to the top of your test script, does it show any errors now?


mssql is not a standard module, you'll need to get your host/server
admin to install it.

There are detailed instructions on the php site:

http://www.php.net/manual/en/mssql.setup.php

If you get stuck, at which step do you get stuck?

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

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



RE: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread Wei, Alice J.
Hi,

   For testing purpose, I have something like

   html
headtitleTest/title
   body
   pThis is test/p
?php echo Hello!; ?
   /body
/html

  I see the following from the command prompt when I execute the above script:

   html
headtitleTest/title
   body
   pThis is test/pHello
   /body
/html

  On the browser, I only see:

html
headtitleTest/title
   body
   pThis is test/p
 /body
/html

  I just realized that the mysql_connect error is a typo, I should have typed 
mssql_connect. I call this from a different machine, so I shouldn't get this 
kind of error even if I don't have it installed, right? Or, am I missing 
something here?

Alice

-Original Message-
From: DeadTOm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:46 PM
To: Wei, Alice J.
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

 Otherwise, it consistently gives me errors Call to undefined
function: mysql_connect()If you're getting an error...

If you're getting this error, there is a line of code in the php script
that is trying to connect to a mysql database and the mysql extension
for php is not installed. So php doesn't know this function is supposed
to do hence, the undefined function error.

 I can only see the HTML code of the php functions I call within the
code at the command output in text format, but I cannot see it on the
browser.

I'm a little confused about what you mean here. You shouldn't see any
HTML code in your browser.

Wei, Alice J. wrote:
 Hi,

   I have originally commented out all the MS SQL lines in the php.ini files 
 so that it supports MS SQL, but that does not seem to work. MySQL? Since I am 
 not using that to connect my PHP to, do I still need to install it? By the 
 way, my Microsoft SQL server database is on a different Windows machine.

 Alice

 -Original Message-
 From: DeadTOm [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 11, 2008 10:29 PM
 To: Wei, Alice J.; php-general@lists.php.net
 Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

 Do you have php-mysql installed? In ubuntu for php5 the package is
 php5-mysql.

 -Allen

 Wei, Alice J. wrote:

 Hi,

   I am currently using a Linux box with Fedora to run my PHP scripts, which 
 I have seen in the download page at http://www.php.net/downloads.php that

We do not distribute UNIX/Linux binaries. Most Linux distributions come 
 with PHP these days.

   What I am wondering is, if I can run my scripts by using the command like 
 php some_php.php, as long as it does not require me to have it displayed on 
 the web page or in need of using a mssql_connect function, it does not give 
 me any errors at all. Otherwise, it consistently gives me errors Call to 
 undefined function: mysql_connect()

   I can only see the HTML code of the php functions I call within the code 
 at the command output in text format, but I cannot see it on the browser.

   Are these two errors related? I tried installing PHP and Apache 
 afterwards, but it seems that it is not providing a different message. Have 
 I missed something here?

 Anything is appreciated.

 Alice
 ==
 Alice Wei
 MIS 2009
 School of Library and Information Science
 Indiana University Bloomington
 [EMAIL PROTECTED]








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



Re: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread DeadTOm

OK, I see now.
When you open the script from your browser are you accessing it via a 
server like Http://localhost/some/file.php or are you just opening a php 
file on your hard drive? I'm guessing you're accessing it on the hard 
drive directly, which will not work since PHP scripts are executed 
server side. So you will need to install apache2 with php.
As far as the mssql_connect error goes, the same rule applies. You need 
to have the proper php module installed to define for php what the 
mssql_connect function does, otherwise php doesn't know what it is and 
yells at you for not defining the function.


-Allen



Wei, Alice J. wrote:

Hi,

   For testing purpose, I have something like

   html
headtitleTest/title
   body
   pThis is test/p
?php echo Hello!; ?
   /body
/html

  I see the following from the command prompt when I execute the above script:

   html
headtitleTest/title
   body
   pThis is test/pHello
   /body
/html

  On the browser, I only see:

html
headtitleTest/title
   body
   pThis is test/p
 /body
/html

  I just realized that the mysql_connect error is a typo, I should have typed 
mssql_connect. I call this from a different machine, so I shouldn't get this 
kind of error even if I don't have it installed, right? Or, am I missing 
something here?

Alice

-Original Message-
From: DeadTOm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:46 PM
To: Wei, Alice J.
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

 Otherwise, it consistently gives me errors Call to undefined
function: mysql_connect()If you're getting an error...

If you're getting this error, there is a line of code in the php script
that is trying to connect to a mysql database and the mysql extension
for php is not installed. So php doesn't know this function is supposed
to do hence, the undefined function error.

 I can only see the HTML code of the php functions I call within the
code at the command output in text format, but I cannot see it on the
browser.

I'm a little confused about what you mean here. You shouldn't see any
HTML code in your browser.

Wei, Alice J. wrote:
  

Hi,

  I have originally commented out all the MS SQL lines in the php.ini files so 
that it supports MS SQL, but that does not seem to work. MySQL? Since I am not 
using that to connect my PHP to, do I still need to install it? By the way, my 
Microsoft SQL server database is on a different Windows machine.

Alice

-Original Message-
From: DeadTOm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:29 PM
To: Wei, Alice J.; php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

Do you have php-mysql installed? In ubuntu for php5 the package is
php5-mysql.

-Allen

Wei, Alice J. wrote:



Hi,

  I am currently using a Linux box with Fedora to run my PHP scripts, which I 
have seen in the download page at http://www.php.net/downloads.php that

   We do not distribute UNIX/Linux binaries. Most Linux distributions come with 
PHP these days.

  What I am wondering is, if I can run my scripts by using the command like php 
some_php.php, as long as it does not require me to have it displayed on the web page or 
in need of using a mssql_connect function, it does not give me any errors at all. 
Otherwise, it consistently gives me errors Call to undefined function: 
mysql_connect()

  I can only see the HTML code of the php functions I call within the code at the command 
output in text format, but I cannot see it on the browser.

  Are these two errors related? I tried installing PHP and Apache afterwards, 
but it seems that it is not providing a different message. Have I missed 
something here?

Anything is appreciated.

Alice
==
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
[EMAIL PROTECTED]



  







  



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



RE: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread Wei, Alice J.
Hi,

-Original Message-
From: DeadTOm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:58 PM
To: Wei, Alice J.
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

OK, I see now.
When you open the script from your browser are you accessing it via a
server like Http://localhost/some/file.php or are you just opening a php
file on your hard drive? I'm guessing you're accessing it on the hard
drive directly, which will not work since PHP scripts are executed
server side. So you will need to install apache2 with php.
As far as the mssql_connect error goes, the same rule applies. You need
to have the proper php module installed to define for php what the
mssql_connect function does, otherwise php doesn't know what it is and
yells at you for not defining the function.

-Allen

Thanks for clarifying the first point, and that is probably why.
As for the second point, according to 
http://us.php.net/manual/en/function.mssql-connect.php, isn't mssql_connect 
defined already as something internal within PHP? Or, am I missing something 
here?

Plus, I connect this not to the localhost, but to a different Windows machine, 
so does this mean that I have to install it? One of the members on the list 
suggested something from http://www.freetds.org/, if this is something I have 
to install, I will definitely give it a shot.

Alice


Wei, Alice J. wrote:
 Hi,

For testing purpose, I have something like

html
 headtitleTest/title
body
pThis is test/p
 ?php echo Hello!; ?
/body
 /html

   I see the following from the command prompt when I execute the above script:

html
 headtitleTest/title
body
pThis is test/pHello
/body
 /html

   On the browser, I only see:

 html
 headtitleTest/title
body
pThis is test/p
  /body
 /html

   I just realized that the mysql_connect error is a typo, I should have typed 
 mssql_connect. I call this from a different machine, so I shouldn't get this 
 kind of error even if I don't have it installed, right? Or, am I missing 
 something here?

 Alice

 -Original Message-
 From: DeadTOm [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 11, 2008 10:46 PM
 To: Wei, Alice J.
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

  Otherwise, it consistently gives me errors Call to undefined
 function: mysql_connect()If you're getting an error...

 If you're getting this error, there is a line of code in the php script
 that is trying to connect to a mysql database and the mysql extension
 for php is not installed. So php doesn't know this function is supposed
 to do hence, the undefined function error.

  I can only see the HTML code of the php functions I call within the
 code at the command output in text format, but I cannot see it on the
 browser.

 I'm a little confused about what you mean here. You shouldn't see any
 HTML code in your browser.

 Wei, Alice J. wrote:

 Hi,

   I have originally commented out all the MS SQL lines in the php.ini files 
 so that it supports MS SQL, but that does not seem to work. MySQL? Since I 
 am not using that to connect my PHP to, do I still need to install it? By 
 the way, my Microsoft SQL server database is on a different Windows machine.

 Alice

 -Original Message-
 From: DeadTOm [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 11, 2008 10:29 PM
 To: Wei, Alice J.; php-general@lists.php.net
 Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

 Do you have php-mysql installed? In ubuntu for php5 the package is
 php5-mysql.

 -Allen

 Wei, Alice J. wrote:


 Hi,

   I am currently using a Linux box with Fedora to run my PHP scripts, which 
 I have seen in the download page at http://www.php.net/downloads.php that

We do not distribute UNIX/Linux binaries. Most Linux distributions come 
 with PHP these days.

   What I am wondering is, if I can run my scripts by using the command like 
 php some_php.php, as long as it does not require me to have it displayed on 
 the web page or in need of using a mssql_connect function, it does not give 
 me any errors at all. Otherwise, it consistently gives me errors Call to 
 undefined function: mysql_connect()

   I can only see the HTML code of the php functions I call within the code 
 at the command output in text format, but I cannot see it on the browser.

   Are these two errors related? I tried installing PHP and Apache 
 afterwards, but it seems that it is not providing a different message. Have 
 I missed something here?

 Anything is appreciated.

 Alice
 ==
 Alice Wei
 MIS 2009
 School of Library and Information Science
 Indiana University Bloomington
 [EMAIL PROTECTED]












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



Re: [PHP] PHP Runs But Does Not Display on Linux

2008-06-11 Thread DeadTOm
With localhost I was assuming that the files resided on your local 
machine, my bad. How are you accessing these files? The location you are 
getting them from has to be running a web server of some kind with php 
or the php scripts will not run and you'll only see the html output as 
you described.
I run a linux server with apache2, php and mysql and I believe that the 
purpose of the php5-mysql package is to add files that define those 
mysql function calls. I'm sure that there is something similar for mssql.


-Allen

Wei, Alice J. wrote:

Hi,

-Original Message-
From: DeadTOm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:58 PM
To: Wei, Alice J.
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

OK, I see now.
When you open the script from your browser are you accessing it via a
server like Http://localhost/some/file.php or are you just opening a php
file on your hard drive? I'm guessing you're accessing it on the hard
drive directly, which will not work since PHP scripts are executed
server side. So you will need to install apache2 with php.
As far as the mssql_connect error goes, the same rule applies. You need
to have the proper php module installed to define for php what the
mssql_connect function does, otherwise php doesn't know what it is and
yells at you for not defining the function.

-Allen

Thanks for clarifying the first point, and that is probably why.
As for the second point, according to 
http://us.php.net/manual/en/function.mssql-connect.php, isn't mssql_connect 
defined already as something internal within PHP? Or, am I missing something 
here?

Plus, I connect this not to the localhost, but to a different Windows machine, 
so does this mean that I have to install it? One of the members on the list 
suggested something from http://www.freetds.org/, if this is something I have 
to install, I will definitely give it a shot.

Alice


Wei, Alice J. wrote:
  

Hi,

   For testing purpose, I have something like

   html
headtitleTest/title
   body
   pThis is test/p
?php echo Hello!; ?
   /body
/html

  I see the following from the command prompt when I execute the above script:

   html
headtitleTest/title
   body
   pThis is test/pHello
   /body
/html

  On the browser, I only see:

html
headtitleTest/title
   body
   pThis is test/p
 /body
/html

  I just realized that the mysql_connect error is a typo, I should have typed 
mssql_connect. I call this from a different machine, so I shouldn't get this 
kind of error even if I don't have it installed, right? Or, am I missing 
something here?

Alice

-Original Message-
From: DeadTOm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:46 PM
To: Wei, Alice J.
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

 Otherwise, it consistently gives me errors Call to undefined
function: mysql_connect()If you're getting an error...

If you're getting this error, there is a line of code in the php script
that is trying to connect to a mysql database and the mysql extension
for php is not installed. So php doesn't know this function is supposed
to do hence, the undefined function error.

 I can only see the HTML code of the php functions I call within the
code at the command output in text format, but I cannot see it on the
browser.

I'm a little confused about what you mean here. You shouldn't see any
HTML code in your browser.

Wei, Alice J. wrote:



Hi,

  I have originally commented out all the MS SQL lines in the php.ini files so 
that it supports MS SQL, but that does not seem to work. MySQL? Since I am not 
using that to connect my PHP to, do I still need to install it? By the way, my 
Microsoft SQL server database is on a different Windows machine.

Alice

-Original Message-
From: DeadTOm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:29 PM
To: Wei, Alice J.; php-general@lists.php.net
Subject: Re: [PHP] PHP Runs But Does Not Display on Linux

Do you have php-mysql installed? In ubuntu for php5 the package is
php5-mysql.

-Allen

Wei, Alice J. wrote:


  

Hi,

  I am currently using a Linux box with Fedora to run my PHP scripts, which I 
have seen in the download page at http://www.php.net/downloads.php that

   We do not distribute UNIX/Linux binaries. Most Linux distributions come with 
PHP these days.

  What I am wondering is, if I can run my scripts by using the command like php 
some_php.php, as long as it does not require me to have it displayed on the web page or 
in need of using a mssql_connect function, it does not give me any errors at all. 
Otherwise, it consistently gives me errors Call to undefined function: 
mysql_connect()

  I can only see the HTML code of the php functions I call within the code at the command 
output in text format, but I cannot see it on the browser.

  Are these two errors related? I tried installing PHP and Apache 

Re: [PHP] Command-line PHP memory limit

2008-06-11 Thread Per Jessen
Rene Fournier wrote:

 Is it possible to set a unique memory limit for PHP scripts that are
 run from the command line? (That is, different from what's specified
 in php.ini.)

This might specific to openSUSE, but the typical installation comes with
separate php.inis for apache and cli. 

/etc/php5/cli/php.ini
/etc/php5/apache2/php.ini


/Per Jessen, Zürich


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