|
Posted by Hot cat on 08/28/06 12:01
On Mon, 28 Aug 2006 13:07:57 +0200, Erwin Moller wrote:
> Hot cat wrote:
>
>> Howdy all,
>>
>> I just installed php 5 in fedora core 4 and have just written a the first
>> scrip[t that comes in the "man php" (echo "hello world") from the command
>> line.
>>
>> I tried to execute
>> #!/bin/php
>> <?php
>> print ("hello world");
>> ?>
>
> Hi Hotcat,
>
> When you say you 'installed php' does that mean you set up PHP so it is
> intergrated in apache?
Apache? I've just got Firefox set up so far. Guess I need to set up an
Apache server then?
> Because the example you give is CGI-like call to PHP. Not many use PHP
> that way. I am even uncertain if that still works..
>
> So unless you have some exotic setup for some reason, start using PHP
> via your browser.
http://localhost/myphptest.php
didn't work "the connection was refused when connecting to local host".
>
> A typical PHP file does NOT contain the bash instruction #!/bin/php. It
> starts like this:
> <?php
> phpinfo();
> ?>
>
> and you call it via your webbrowser:
> http://localhost/myphptest.php
>
>
> Or if you call it via commandline:
> /pathtophp/php myTest.php
>
>
> Hope that helps.
>
> If it does not, come back here.
>
I'm baa-ack!
> Regards,
> Erwin Moller
>
>
>> I get bash errors and it won't run.
>> Same when I tried to place a few simple "hello worlds" in a piece of
>> html that I \itried to run on Friefox. Whats the story do I have to
>> fiddle with php.ini, install a plug in for Friefox?
>>
>> TIA
Navigation:
[Reply to this message]
|