[SOLVED] PHP does not work anymore

M66B

Mitglied
Mitglied seit
17 Feb 2010
Beiträge
225
Punkte für Reaktionen
0
Punkte
0
Code:
/usr/bin/php-cgi --version

prints

Code:
PHP 5.2.13 (cgi-fcgi) (built: Apr 30 2010 15:12:56)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

So PHP is installed

Code:
cat /mod/etc/httpd.conf

prints

Code:
/:admin:<deleted>
/phpxmail/servers.php:admin:<deleted>
*.php:/usr/bin/php-cgi

So httpd should know about PHP, but PHP files are not processed (I use PHP for PHPXMail). I did work and except for upgrading to the lastest trunk I am not aware of any changes.

It did work but not anymore and I can't figure out why. I am missing something?
 
Zuletzt bearbeitet:
There seem's to be all ok, i have exact the same output of all of your's. My php is working probably (also PHPXmail). Maybe some error's in php.ini? Mysterious
 
I noticed on another PC it was just working. Clearing the browser cache on the first PC solved this strange problem.
 
please add something like "[solved]" to this thread. Thx a lot.
 
Still having problems with this, each time (after flashing/reboot) my /mod/etc/httpd.conf is truncated to
Code:
/:admin:<deleted>
and thus missing
Code:
/phpxmail/servers.php:admin:<deleted>
*.php:/usr/bin/php-cgi
Does anybody have an idea why?

I corrected this by modifying the file and doing a modsave. Is this the right way?
 
Zuletzt bearbeitet:
Take a look into the file /etc/default.mod/httpd_conf, this file create's /mod/etc/httpd.conf on startup.
Do you have externalized php and/or xmail on usb device? Maybe the usb device has not (finished) mounting and the file php-cgi is not available.
 
/etc/default.mod/httpd_conf contains
Code:
#!/bin/sh

echo "/:$MOD_HTTPD_USER:$MOD_HTTPD_PASSWD"
# protect file servers.php to be viewed in clear text via URL with a fantasy password
[ -h /usr/mww/phpxmail/servers.php ] && echo "/phpxmail/servers.php:$MOD_HTTPD_USER:<deleted>"
local php_cgi=$(which php-cgi)
[ -x "${php_cgi}" ] && echo "*.php:${php_cgi}"
Yes, I have externalized PHP (but not XMail itself) and yes I think you are right about php-cgi not being available.

Is there a way to prevent this or can I better not externalize PHP? Maybe by deleting
Code:
[ -x "${php_cgi}" ]
(before flashing)
 
Create the file /tmp/flash/httpd_conf
Code:
#!/bin/sh
echo "/:$MOD_HTTPD_USER:$MOD_HTTPD_PASSWD"
# protect file servers.php to be viewed in clear text via URL with a fantasy password
echo "/phpxmail/servers.php:$MOD_HTTPD_USER:76advw6djc734hwh"
echo "*.php:/usr/bin/php-cgi"
Don't forget this:
Code:
chmod +x /tmp/flash/httpd_conf
modsave
 
Thanks for your suggestion.
Can you explain how this works?
(when is /tmp/flash/httpd_conf executed? Probably before /etc/default.mod/httpd_conf?)
 
Ok, I consider this as solved now.
Learned something more about Freetz too.
Is there some place in the wiki were this is documented?
Else I would be happy to add it somewhere.
 
I don't believe that this is documented, because it is a 'dirty hack'. We should make a better solution to prevent this behaviour, but it's not so easy.
 

Zurzeit aktive Besucher

Statistik des Forums

Themen
244,868
Beiträge
2,219,771
Mitglieder
371,585
Neuestes Mitglied
PauSchmitz
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.