PHP issues sad smiley

Posted by Stevy44 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
PHP issues sad smiley
January 31, 2017 09:59AM
Hello there,

I upgraded the PB to 1.1.2, and placed my PHP files into the share/content (USB drive) but when. I load the page I got a 404 error. I removed the # line in the conf file.

Thank you for your help !
Re: PHP issues sad smiley
January 31, 2017 06:54PM
How can you get a 404 while a 404 would create an instant redirect?
Which type of PirateBox are you running?

best regards Matthias
Re: PHP issues sad smiley
January 31, 2017 09:01PM
I'm running the latest version you proposed (1.1.2) and i'm just trying to upload a php script on the box. I tried to upload the whole content in the folder www_content and also www and finally the share/content folder but i cannot manage to see the script.

Edit : I got an endless "redirect" message on firefox and a 404 not found on Opera.



Edited 1 time(s). Last edit at 01/31/2017 09:08PM by Stevy44.
Re: PHP issues sad smiley
February 01, 2017 07:36PM
Re: PHP issues sad smiley
February 06, 2017 06:49PM
Can you try to test the php stuff with simply creating a script executing:

Language: PHP
<?php phpinfo(); ?>

The file should be in the /content/ folder (url), see /opt/piratebox/conf/lighttpd/fastcgi-php.conf
#-------------------- FAST CGI stuff

$HTTP["url"] =~ "^/content/" {
    fastcgi.server = (
        ".php" => ((
                "bin-path" => "/usr/bin/php-cgi",
                "socket" => "/tmp/php.socket",
                "max-procs" => 1
            ))
    )
}

The path is

/opt/piratebox/share/content
or (on OpenWrt)
/mnt/usb/PirateBox/content

Best regards
Matthias
Re: PHP issues sad smiley
February 17, 2017 08:31PM
I have a working box v2 on MR3040. I would like to have a html write and amend a text file. I understand that I need a PHP script. Is PHP part of the install? If not how do I install and activate PHP