Hi,

   For testing purpose, I have something like

   <html>
    <head><title>Test</title>
   <body>
   <p>This is test</p>
    <?php echo "Hello!"; ?>
   </body>
    </html>

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

   <html>
    <head><title>Test</title>
   <body>
   <p>This is test</p>Hello
   </body>
    </html>

  On the browser, I only see:

    <html>
    <head><title>Test</title>
   <body>
   <p>This 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

Reply via email to