pindiwala
pindiwala

Reputation: 3707

phpmyadmin - save file to disk

when i point my browser to http://localhost/phpmyadmin, instead of showing me its front page, it comes up with save as dialog.

I'm running: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 Server

I've reinstalled both apache2 and php5. After re-install i don't have httpd.conf file, how can i get it back? Is there a standard file which i can just copy into /etc/apache2?

I did a locate httpd.conf and the only file i got was the empty file i have under /etc/apache2/ which i made.

Upvotes: 2

Views: 4368

Answers (4)

Nham Nguyen
Nham Nguyen

Reputation: 621

I also get this problem when I install ISPconfig. I solved the problem by this tutorial: http://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3-p4

I think the main code is change suphp.conf config.

sudo nano /etc/apache2/mods-available/suphp.conf

comment out the <FilesMatch "\.ph(p3?|tml)$"> section and add the line AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml - otherwise all PHP files will be run by SuPHP

<IfModule mod_suphp.c>
    #<FilesMatch "\.ph(p3?|tml)$">
    #    SetHandler application/x-httpd-suphp
    #</FilesMatch>
        AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml
        suPHP_AddHandler application/x-httpd-suphp

    <Directory />
        suPHP_Engine on
    </Directory>

    # By default, disable suPHP for debian packaged web applications as files
    # are owned by root and cannot be executed by suPHP because of min_uid.
    <Directory /usr/share>
        suPHP_Engine off
    </Directory>

# # Use a specific php config file (a dir which contains a php.ini file)
#       suPHP_ConfigPath /etc/php5/cgi/suphp/
# # Tells mod_suphp NOT to handle requests with the type <mime-type>.
#       suPHP_RemoveHandler <mime-type>
</IfModule>

Hope I can help someone :)

Upvotes: 3

Jorge
Jorge

Reputation:

I dont know anything about this but... does someone knows a way in javascript to download selected files, for example I select through checkboxes 2 files, and then I click on a button in order to download these 2 files choosing the route where i will save the archives

Upvotes: 0

Vincent Van Den Berghe
Vincent Van Den Berghe

Reputation: 5575

Did you configure the php extension to send an http header?

In httpd.conf: AddType application/x-httpd-php .php

EDIT
The file is not necessarily named httpd.conf, that's just the default name. Try searching for other configuration files in the Apache directory -- the extension probably is .conf but it might be something else... If you used apt-get on debian to install apache2, try /etc/apache2/apche2.conf
/EDIT

Upvotes: 4

Stepan Mazurov
Stepan Mazurov

Reputation: 1374

I think you just do not know where that config file is. I don't think apache can run without httpd.conf. Here is how you can find your config:
$>locate httpd.conf
/etc/httpd/conf/httpd.conf
$>vim /etc/httpd/conf/httpd.conf

Once you located it, find where other AddType reside and add
AddType application/x-httpd-php .php

Last thing you need to do is restart your httpd, it depends on install, but doing apachectl restart does the trick. You might have to locate it just like you did with httpd.conf file and type in the entire path to the file.

Afterwords, your phpmyadmin should come up.

Upvotes: 1

Related Questions