Click here to Skip to main content
15,390,899 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
QuestionOpen Suse Linux Pin
ForNow27-Dec-16 13:42
MemberForNow27-Dec-16 13:42 
AnswerRe: Open Suse Linux Pin
Richard MacCutchan27-Dec-16 21:00
mveRichard MacCutchan27-Dec-16 21:00 
GeneralRe: Open Suse Linux Pin
ForNow28-Dec-16 2:11
MemberForNow28-Dec-16 2:11 
GeneralRe: Open Suse Linux Pin
Richard MacCutchan28-Dec-16 5:45
mveRichard MacCutchan28-Dec-16 5:45 
AnswerRe: Open Suse Linux Pin
Albert Holguin9-Jan-17 7:52
professionalAlbert Holguin9-Jan-17 7:52 
QuestionWhich is the Best Laravel Admin Template with all the advanced functionalities? Pin
Rakeshroshans23-Dec-16 20:00
MemberRakeshroshans23-Dec-16 20:00 
AnswerRe: Which is the Best Laravel Admin Template with all the advanced functionalities? Pin
Richard MacCutchan23-Dec-16 21:55
mveRichard MacCutchan23-Dec-16 21:55 
Questionfail to run php script as shell Pin
njzt6-Dec-16 15:36
Membernjzt6-Dec-16 15:36 
Hi all,

It's a Nginx and PHP web project, When I run a php script as shell, there shows Access Denide!

PHP
X-Powered-By: PHP/7.0.9
Content-type: text/html; charset=UTF-8

Access Denied!


The php file is like this:
PHP
#!/usr/bin/php-cgi
<?php

require_once("config.php");
require_once("util.php");

...
..
.

file_put_contents($argv[1], CJSON::encode($obj));

?>


I have try to change all the php file as 777, and try to run like this:
./list.php /home/cache.json

/usr/bin/php list.phph  /home/cache.json


Still can not work.

and then I try to make a new php script test.php:
#! /usr/local/php7/bin/php-cgi

<?php
	
	echo "php test";

?>



and then run it:
/usr/local/php7/bin/php-cgi test.php


it works:
[root@localhost ~]#  /usr/local/php7/bin/php-cgi test.php
X-Powered-By: PHP/7.0.9
Content-type: text/html; charset=UTF-8


php test


I don't now why, anyone can help? Thanks for advance.
SuggestionRe: fail to run php script as shell Pin
Richard MacCutchan6-Dec-16 22:03
mveRichard MacCutchan6-Dec-16 22:03 
QuestionDatabase connection refused. Pin
taiwokaffo6-Dec-16 4:16
Membertaiwokaffo6-Dec-16 4:16 
QuestionRe: Database connection refused. Pin
Richard MacCutchan6-Dec-16 4:27
mveRichard MacCutchan6-Dec-16 4:27 
AnswerRe: Database connection refused. Pin
taiwokaffo6-Dec-16 4:45
Membertaiwokaffo6-Dec-16 4:45 
GeneralRe: Database connection refused. Pin
Eddy Vluggen6-Dec-16 4:58
professionalEddy Vluggen6-Dec-16 4:58 
GeneralRe: Database connection refused. Pin
taiwokaffo6-Dec-16 23:06
Membertaiwokaffo6-Dec-16 23:06 
QuestionPHP topic selection for Final year Project Pin
Member 1278820324-Nov-16 2:51
MemberMember 1278820324-Nov-16 2:51 
GeneralRe: PHP topic selection for Final year Project Pin
Kornfeld Eliyahu Peter24-Nov-16 5:08
professionalKornfeld Eliyahu Peter24-Nov-16 5:08 
AnswerRe: PHP topic selection for Final year Project Pin
Richard MacCutchan24-Nov-16 6:37
mveRichard MacCutchan24-Nov-16 6:37 
GeneralRe: PHP topic selection for Final year Project Pin
Member 127882035-Dec-16 22:17
MemberMember 127882035-Dec-16 22:17 
GeneralRe: PHP topic selection for Final year Project Pin
Member 127882036-Dec-16 22:35
MemberMember 127882036-Dec-16 22:35 
QuestionSeveral arrays to one multidimensional Pin
Member 128309193-Nov-16 5:29
MemberMember 128309193-Nov-16 5:29 
AnswerRe: Several arrays to one multidimensional Pin
WildDonkey11-Feb-17 3:59
MemberWildDonkey11-Feb-17 3:59 
QuestionOOP in PHP Pin
Member 1278820328-Oct-16 4:22
MemberMember 1278820328-Oct-16 4:22 
AnswerRe: OOP in PHP Pin
Anurag Gandhi13-Nov-16 6:09
professionalAnurag Gandhi13-Nov-16 6:09 
GeneralRe: OOP in PHP Pin
Peter_in_278013-Nov-16 13:38
professionalPeter_in_278013-Nov-16 13:38 
GeneralRe: OOP in PHP Pin
Member 1278820324-Nov-16 2:03
MemberMember 1278820324-Nov-16 2:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.