PHP scripts problem!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers PHP scripts problem!
# 1  
Old 01-07-2008
Excellent! I'm glad you found a solution. Thanks for the info about it too.
# 2  
Old 01-08-2008
As I said, I don't know, what files and where can I copy my files?
# 3  
Old 01-08-2008
Check the "php" executable being used. You can run "php -v" on the command line. On my Debian system, it displays

Code:
cbkihong@cbkihong:~$ php -v
PHP 5.1.4 (cgi) (built: Jun  4 2006 00:37:25)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

which shows the CGI version is used. On another server of mine it shows the CLI version:

Code:
admin@np64gw:~$ php -v
PHP 5.2.1 (cli) (built: Feb  9 2007 23:01:18)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

The CGI version differs from the CLI version in that the CGI version will send certain required HTTP response headers, but the CLI version will not. For instance,

Code:
cbkihong@cbkihong:~$ php
<? echo "a" ?>
< HIT CTRL-D HERE >
X-Powered-By: PHP/5.1.4
Content-type: text/html

a

The version installed on a Web server should be a CGI version one instead of the CLI version. For Debian, the 'php5-cgi' is likely the package you should install.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem in two scripts

I wrote one script it is showing wrong out but i wrote another script it is showing right out. I really don't know the difference. first-script-showing mistake. #!/bin/bash echo "Counting the Databases" countp1=`ps -ef |grep pmon |grep -v grep | wc -l` echo $countp1 #countp=3 if ... (3 Replies)
Discussion started by: learnbash
3 Replies

2. UNIX for Dummies Questions & Answers

Execution problem in running multiple scripts

hi all, I have 3 individual scripts to perform the task . 2nd script should run only after the 1st script and 3rd script must run only after first 2 scripts are executed successfully. i want to have a single script that calls all this 3 scripts .this single script should execute the 2nd script... (1 Reply)
Discussion started by: Rahul619
1 Replies

3. UNIX for Advanced & Expert Users

Running multiple php scripts into one php only, cron mail alert problem...

hi, while separated they produce the usual mail alert and i can see the output... if i write into the php script: <?php system('php -f /var/www/vhosts/domain.com/httpdocs/folder/script1.php'); system('php -f /var/www/vhosts/domain.com/httpdocs/folder/script2.php'); system('php -f... (0 Replies)
Discussion started by: 7stars
0 Replies

4. Shell Programming and Scripting

Problem with ftp scripts and cron

Need some help / advice with the follow script... Basically i have an FTP server that connects to other ftp servers and sends and downloads files every few hours or so. There are 12 different accounts that all have 2 scripts each, one to send and one to receive. Below is an example send script... (1 Reply)
Discussion started by: mokachoka
1 Replies

5. Shell Programming and Scripting

Crontab PHP scripts not ending

when i run the scripts from command line like php ./file.php they run fine and it ends. But i have them running in crontab every 5 minutes and they sometimes dont close. Can i write something to log why or force them to close after a certain amount of time by killing the pid? (2 Replies)
Discussion started by: nitrous
2 Replies

6. Shell Programming and Scripting

Cron and multiple scripts problem.

Hello All, I have 3 scripts namingly 1X 2X and 3X. I have one directory ABC created which contains some 40 sub directories. I have one input file in the below format.The input file resides in ABC directory. Inputfile format; subdirectoryname date subdirectoryname1 date subdirectoryname2... (1 Reply)
Discussion started by: RSC1985
1 Replies

7. HP-UX

scripts problem

Hi, the only experience I have with Unix is on C360 workstations using 10.20 and Omniback II to restore email with HP Openmail. I have four brand new machines that I am installing the OS and software on, however, their are scripts that were written specifically for our tape process that I have... (13 Replies)
Discussion started by: Asheley Ryan
13 Replies

8. Shell Programming and Scripting

How to connect PHP and Shell Scripts

Dear Friends, Plz some one tell me how to connect PHP and Shell Scripts. Mail me on address removed by moderator Thanks Nishant (3 Replies)
Discussion started by: krishna_sicsr
3 Replies

9. Shell Programming and Scripting

Shell scripts problem...

Hi, sprt.sh #!/bin/ksh ############################################################################### # ----------------------------------------------------------------------------- # # ------------------------------------------------------------------------------... (1 Reply)
Discussion started by: parola
1 Replies
Login or Register to Ask a Question