php file is not executed

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat php file is not executed
# 1  
Old 03-02-2010
php file is not executed

hello

i have installed php on my FC 10 Machine and made the necessary changes.
like:-
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

in the "httpd.conf"

But when i run php file it opens file as "Save As" dialogue box.

anyone can guess why ?

THX all in adv.

Waiting for ur responses
# 2  
Old 03-03-2010
Did you restart apache after you installed php?
# 3  
Old 03-06-2010
Hi,
I guess that's a problem related to SELinux. It looks your files don't have context...

Try the below :

Code:
restorecon -R /var/www/html/*.*


and see what happened...
# 4  
Old 03-07-2010
THx ismail
I guess there is some problem related with SELinux.
I execute ur command but the problem still exists.
Now i can view the source code, The code is not executed.
# 5  
Old 03-08-2010
Dear phpalerts,
hum,
Can you remove the lines you have added and replace them by the below in http.conf :

Code:
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phps
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .html
AddType application/x-httpd-php-source .phps
</IfModule>

Try and see...
# 6  
Old 03-08-2010
THX ismail, But nothing is working for me right now

THX ismail, But nothing is working for me right now.

It still shows the source code
I restarted apache but the same issue
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Save executed file details

Hi Everyone!!! I have a script file in which execution is performing for 500 folders. But sometime due to some error in execution script terminated at middle of execution(at 200 folder).when again we will start the processing it will start from first folder but i want that it should start from last... (1 Reply)
Discussion started by: pr128att
1 Replies

2. Shell Programming and Scripting

Create file when script has executed

I would like to get some kind of notification when a script has been executed. I know how to get an email sent, but I something different. This works, unless it occurs when I am not at my computer. notify-send "Cleanup of Backup Directories complete." It could even involve creating... (2 Replies)
Discussion started by: drew77
2 Replies

3. Shell Programming and Scripting

Whats the profile file that is auto executed when I login

Hi, I dont find any .profile under my user home directory. These are the only files i see in my home directory. # ls -laq total 44 drwx------ 4 user1 adm 4096 Nov 23 05:10 . drwxr-xr-x. 12 root root 4096 Nov 22 13:05 .. -rw-r--r-- 1 user1 adm 18 Nov 22 13:05 .bash_logout... (3 Replies)
Discussion started by: mohtashims
3 Replies

4. HP-UX

/etc/profile file not executed

Hi Experts, On one of hp-ux box I have writen the code to disable the direct login for some of the users in /etc/profile file. However when logging into terminal seems /etc/profile is not executed and users are still able to directly login into the terminal. Default shell for user is... (3 Replies)
Discussion started by: sai_2507
3 Replies

5. Shell Programming and Scripting

help with shell script executed by php.

I made a shell script to execute a server in screen mode. # start server screen -d -m -S Test ./application echo "Program Started Successfully" than I'm executing it from php by echo shell_exec('/home/script.sh'); and it is giving me this error. "cannot make directory... (1 Reply)
Discussion started by: dmallia
1 Replies

6. AIX

Script not getting executed via cron but executes when executed manually.

Hi Script not getting executed via cron but executes successfully when executed manually. Please assist cbspsap01(appuser) /app/scripts > cat restart.sh #!/bin/ksh cd /app/bin date >>logfile.out echo "Restart has been started....." >>logfile.out date >>logfile.out initfnsw -y restart... (3 Replies)
Discussion started by: samsungsamsung
3 Replies

7. Shell Programming and Scripting

can't executed bash from PHP..

dear list, i've just write a simple php script to add user to my iptables, but some times it works and it dosn't work,, here's my script for my adduser.php <?php exec('/var/www/html/backup.sh'); $hash = "# $_POST\n"; $ip = "-A INPUT -p tcp -m tcp -s $_POST -d 10.10.105.18 --dport 8080 -j... (2 Replies)
Discussion started by: ridwanfi
2 Replies

8. Programming

File compiles but produces Memory fault when executed

I run the following K$ cc -v dtfn.c -o dtfn Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking... (3 Replies)
Discussion started by: sewood
3 Replies

9. Shell Programming and Scripting

calculating the time difference, when the script was executed and the currenent file

Hi, I has created the shell script in HP_UX 11.23 and using the command, echo $(date +%Y%m%d%H%M%S) > $DIR/alert, placing the time of running the script into a file alert. I want to compare the time in the above file alert with the current time.If difference is more than 5 min, then print the... (7 Replies)
Discussion started by: velocitnitin
7 Replies

10. UNIX for Advanced & Expert Users

How to restrict Core file generation after scp (of SSH) command executed in UNIX

Hi, I am getting core file in local machine after trasfer files to other machine by using scp (secure copy) of SSH in UNIX. Could any one please tell me how to restrict core file generatation by using scp command. (4 Replies)
Discussion started by: nrsekhar
4 Replies
Login or Register to Ask a Question