LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   PHP Installation (https://www.linuxquestions.org/questions/linux-newbie-8/php-installation-582058/)

dark_angel 09-10-2007 07:05 AM

i think i have an idea. as i was editing my php.ini, i found this line:

;Enable the PHP scripting language under Apache.
engine = On

I tried to change the value to "Off" then restarted my Apache server. i opened a php script in firefox but firefox asked me if i wanted to open the file or save it. then i removed this line in my httpd.conf:

AddType application/x-httpd-php .php

i restarted the Apache server then tried to run a php script in firefox but this time it displayed the source code of the php script. i then added the 'Addtype' line back to httpd.conf and changed the engine value back to 'On' in php.ini. I restarted the server and everything is again back to normal.

so try adding the 2 lines in their respective config files and see what happens.

concerning the php module that apache needs, i have no idea what that error means since , as i said earlier, my apache is already configured when i installed my system.

rn5a 09-10-2007 11:05 AM

Dark_angel, I finally had to turn to your suggestion to install XAMPP. I have had enough of this LAMP installation....just could not afford to waste any more time on LAMP installation. XAMPP took less than 2 minutes to install. How I wish I could have heeded to your advice in the first place! Anyway, better late than never, isnīt it?

BTW, I did try out your last suggestion (changes in the php.ini & httpd.conf files) but it didnīt make any difference. The presence of the line

AddType application/x-httpd-php .php

always makes FireFox prompt me to open the PHP files or download them & itīs absence just shows the source code in FireFox!

A few more questions please - now that I have installed XAMPP, can I uninstall Apache, PHP & MySQL which I had installed individually earlier? WIll that be safe? By safe, I mean uninstalling them shouldnīt prevent XAMPP from working properly. I noticed that XAMPP supports phpMyAdmin but nothing is given about MySQL Administrator. Does it support MySQL Administrator? I donīt think so. Finally to work with phpMyAdmin, do I have to install phpMyAdmin exclusively (from Software Media Manager)? I believe I have to!

Thanks a lot for extending so much help to me. You definitely have put in a lot of efforts to help me. Thanks a lot once again.

Regards,

Ron

geharvey 09-12-2007 03:26 AM

hello,

I had the same problem. my web browser wanted to download the PHP files, so I put the following line in the httpd.conf file. It seemed to do the trick.

AddHandler php4-script .php

dark_angel 09-15-2007 06:27 AM

sorry for the late reply.

i think it's safe to uninstall your previous apache,mysql and php. but to be safe, always backup your data first just in case xampp won't work after you uninstall those packages and you'll have to reinstall xampp.

as for phpmyadmin, my previous xampp already has it (i used the windows version of xampp). i don't know with the xampp package that you have. try pointing your browser to localhost. you should see xampp's default page. there are links in that page. see if phpmyadmin is listed.


All times are GMT -5. The time now is 11:20 AM.