New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
PHP Suddenly stopped working?
Harro LET!
So I'm using the standard Minstall, got Deluge running and also PHPMYADMIN running, for some reason, none of the domains I have on this node want to run PHP. Here's the config for "samplecode.me"
server { listen 80; server_name samplecode.me; rewrite ^/(.*) http://www.samplecode.me/$1 permanent; } server { listen 80; server_name www.samplecode.me; access_log off; error_log /home/chris/http/logs/samplecode.me.log; index index.html index.php; root /home/chris/http/hosts/samplecode.me; include /etc/nginx/conf.d/cache.conf; include /etc/nginx/conf.d/deny.conf; include /etc/nginx/php.d/chris.conf; }
Here's "chris.conf" from "php.d"
location ~ \.php$ { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/home/chris/http/private/php.socket; include fastcgi_params; try_files $uri =404; }
Really confused, since this is the normal setup right? http://www.samplecode.me/
EDIT
Fixed, didnt recognise <? and ?> properly, needed <?php ?>.
Comments
http://www.samplecode.me/index.php
it works
Am I missing something?
Works, but
Is the contents, surely that outputs the "phpinfo():"?
Oh. Fixed.
Short tags are, I believe, turned off by default. It is possible to enable these in your PHP configuration, but not advisable. It's better to just change all the opening tags in your code to <?php instead of <?.
Just wondering, what's the new site going to be like a jsfiddle type or what?
From PHP 5.3 onward, short tags are normally going to be turned off by default... seems like you were a lil late in the game to upgrade. (or just started using a script that was written for 5.2).
@nexus
Initially it was going to be a pastebin, but I'm considering "my.samplecode.me" to be a jsfiddle alternative, providing I can A) Find time to make it; or find a jsfiddle open source script.
Enable short open tags.
http://www.websanova.com/tutorials/jquery/how-to-write-your-own-jsfiddle-in-15-minutes-or-less
http://jsnova.websanova.com/
https://github.com/websanova/wJSNova
Short tags are not of the relative standards and should never, ever be used.
Tell that to the devs who dev stuff with them, yawn.
I'm just telling him what was wrong.