[opensuse] php script not working in firefox
I have a html page with a search box using a php script. However the search facility does not work, each time I press enter a new window appears asking to open or save the file *.php. Is there something else I need to install in order to have the php script working? -- Bogdan Cristea -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Bogdan Cristea wrote:
I have a html page with a search box using a php script. However the search facility does not work, each time I press enter a new window appears asking to open or save the file *.php. Is there something else I need to install in order to have the php script working?
PHP works server-side. So it has nothing to do with your browser. Probably there is something wrong with the server configuration. Kind regards, -- Leo Eraly <leo at unstable dot be> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sorry, I was not clear enough. The web page is opened locally. On Wednesday 29 August 2007 13:10, you wrote:
Bogdan Cristea wrote:
I have a html page with a search box using a php script. However the search facility does not work, each time I press enter a new window appears asking to open or save the file *.php. Is there something else I need to install in order to have the php script working?
PHP works server-side. So it has nothing to do with your browser. Probably there is something wrong with the server configuration.
Kind regards,
-- Bogdan Cristea -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Bogdan Cristea wrote:
Sorry, I was not clear enough. The web page is opened locally.
I assume this is the reason why it's not working A php page is parsed on the server and sends the html and output to the client ( = your browser). from http://be.php.net/manual/en/introduction.php ... What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server. ... You cannot open a php file locally in your browser. If you want to test it on a local machine you need to run a webserver on your machine and access the page by surfing to it (e.g http://localhost/page.php) Leo -- Leo Eraly <leo at unstable dot be> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 29 August 2007, Bogdan Cristea wrote:
Sorry, I was not clear enough. The web page is opened locally.
On Wednesday 29 August 2007 13:10, you wrote:
Bogdan Cristea wrote:
I have a html page with a search box using a php script. However the search facility does not work, each time I press enter a new window appears asking to open or save the file *.php. Is there something else I need to install in order to have the php script working?
PHP works server-side. So it has nothing to do with your browser. Probably there is something wrong with the server configuration.
Bogdan Cristea was right anyway... If it's opened locally you need a webserver (apache) running on your computer. The webserver only executes those scripts that are located in the directories that are configured for it. IIRC if you installed the server with Yast then by default you have a directory /srv and pages or scripts you place in (subdirectories in) there are executed. Also, to make apache handle your scripts you must load the page correctly with http://localhost/your_dir_inside_srv/your_page.html (and *not*: file:///srv/your_dir/your_page.html) hth Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com erotic art photos: http://www.bauer-nudes.com/en/linux.html Madagascar special: http://www.fotograf-basel.ch/madagascar/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sorry: I wanted to say, that Leo Eraly was right, of course :-) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Bogdan Cristea schreef:
Sorry, I was not clear enough. The web page is opened locally.
On Wednesday 29 August 2007 13:10, you wrote:
Bogdan Cristea wrote:
I have a html page with a search box using a php script. However the search facility does not work, each time I press enter a new window appears asking to open or save the file *.php. Is there something else I need to install in order to have the php script working? PHP works server-side. So it has nothing to do with your browser. Probably there is something wrong with the server configuration.
If you want to test php scripts without installing a full blown webserver you may consider installing php on your machine and do a php foo.php > foo.html from the command line. Alternatively there is the invaluable http://www.meandeviation.com/tutorials/learnphp/php-syntax-check Regards, -- Jos van Kan registered Linux user #152704 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 29 August 2007 02:59, Bogdan Cristea wrote:
I have a html page with a search box using a php script. However the search facility does not work, each time I press enter a new window appears asking to open or save the file *.php. Is there something else I need to install in order to have the php script working?
Is PHP up and running as a service to apache? Since PHP is a server-side script, if you're getting any "PHP" files on the browser, your "server" isn't running or processing the file properly. You need to make sure (a) the PHP script is properly written (b) apache is running PHP as a module and (c) that the script is being called from within your page. HTH! -- kai ponte www.perfectreign.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Bogdan Cristea
-
Daniel Bauer
-
Jos van Kan
-
Kai Ponte
-
Leo Eraly