ballouta Posted February 20, 2008 Share Posted February 20, 2008 Hello, I installed a gallery template using the 4images 'software' when the user registers for the first time, as usuall, he presses on "Accept", then inserts his username, password and email address. After I press on 'submit' button, the resigter.php file downloads to my PC!! WHY? here's the problem http://madeena.org/gallery/register.php Note that the admin is getting an email that a new user is registered!!! thanks Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/ Share on other sites More sharing options...
MatthewJ Posted February 20, 2008 Share Posted February 20, 2008 PHP is not reading the file... The same thing happens if you run .php scripts on a server without php installed. Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-471787 Share on other sites More sharing options...
ballouta Posted February 20, 2008 Author Share Posted February 20, 2008 Thanks, so the problem from the server i am hosting the site on? Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-471794 Share on other sites More sharing options...
schilly Posted February 20, 2008 Share Posted February 20, 2008 Make a file called info.php and put this tag in it without spaces in the php tag: <?php phpinfo() ?> Upload it to your server and load it up in your browser. If it doesn't have php build info then you dont have php on your server. For some reason when I add a ; into the code above I get a forums permission error. Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-471855 Share on other sites More sharing options...
revraz Posted February 20, 2008 Share Posted February 20, 2008 So apparently register.php has no php code in it? Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-471857 Share on other sites More sharing options...
ballouta Posted February 20, 2008 Author Share Posted February 20, 2008 thanks again, i made the file and this is what i got, http://madeena.org/info.php Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-471869 Share on other sites More sharing options...
revraz Posted February 20, 2008 Share Posted February 20, 2008 Its something in the code, php is installed. Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-471880 Share on other sites More sharing options...
Daleeburg Posted February 20, 2008 Share Posted February 20, 2008 Did you put any header information in the file? Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-472012 Share on other sites More sharing options...
vicodin Posted February 20, 2008 Share Posted February 20, 2008 If you have htaccess make the server read php in a html file. and give it an html ending. Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-472022 Share on other sites More sharing options...
weekendWorker Posted February 21, 2008 Share Posted February 21, 2008 Add this to your httpd.conf: AddType application/x-httpd-php .php And then restart restart Apache Hope this helps you out. Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-472532 Share on other sites More sharing options...
ballouta Posted February 21, 2008 Author Share Posted February 21, 2008 Hi, this is how the php file begins, of course it is long code! <?php $main_template = 'register'; define('GET_CACHES', 1); define('ROOT_PATH', './'); include(ROOT_PATH.'global.php'); require(ROOT_PATH.'includes/sessions.php'); $user_access = get_permission(); include(ROOT_PATH.'includes/page_header.php'); if ($action == "") { $action = "signup"; } Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-472575 Share on other sites More sharing options...
uniflare Posted February 21, 2008 Share Posted February 21, 2008 you may need to debug the code personally if its really big. take out pieces of code (CTRL+X), refresh the page and c if it loads, if it doesn't change just paste the code back in there and try another section, once you have found a big section thats the cause try and narrow it down. this is what i do when i really cant find the culprit. try the same filename but with just a simple phpinfo() call, might be restrictive filenames or something. Link to comment https://forums.phpfreaks.com/topic/92127-solved-php-file-is-downloading/#findComment-472683 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.