syntax error
-
Apologies if this came up previously, though I was unable to find any solutions via search.
I am getting the following error:
/etc/init.d/php-fastcgi: 87: Syntax error: "||" unexpectedAfter running:
sudo /etc/init.d/php-fastcgi startThis is following this tutorial:
http://vpsbible.com/web-servers/serve-multiple-sites-blogs-with-virtual-hosts/I am a super noob at this, so any help would be greatly appreciated!
Posted 1 year ago # -
So running through all of the tutorials again, I still have the syntax errors, but I was still able to proceed with the tutorial. Everything seemed fine, but now I am now facing the same problems as the users here:
http://vpsbible.com/forums/topic/502-bad-gateway-error#post-1435Posted 1 year ago # -
I'm getting the same error, anyone?
error:
sudo /etc/init.d/php-fastcgi start
/etc/init.d/php-fastcgi: line 87: syntax error near unexpected token `||'
/etc/init.d/php-fastcgi: line 87: ` || return 1'Posted 1 year ago # -
best advice? go the php-fpm route instead, following that tutorial .. not only is it less hassle but PHP has taken fpm into the core so it's better for future-proofing.
Posted 1 year ago # -
I too am getting the syntax error:
"/etc/init.d/php-fastcgi: 87: Syntax error: "||" unexpected"
I have gone back and installed php-fmp and still get the error. Whats more I used to see the nginx started screen when typing my domain in a browser and now that is broken. Any workaround on this?
Posted 1 year ago # -
Install php-fpm
http://vpsbible.com/php/php-fpm-mysql-nginx/
After that do not try to start your previously installed php-fastcgi, but remove it instead :
Just use the following syntax:
sudo apt-get remove {package-name}For example remove package called mplayer, enter:
sudo apt-get remove mplayerRemove package called lighttpd along with all configuration files, enter:
sudo apt-get --purge remove lighttpdTo list all installed package, enter:\
dpkg --list
dpkg --list | less
dpkg --list | grep -i 'http'Posted 1 year ago # -
if you get an syntax error change this fiel in /etc/init.d/php-fastcgi
old
-------------------------
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
--background --make-pidfile --chuid $EXEC_AS_USER --startas $DAEMON -- \
$DAEMON_ARGS \
|| return 2
}
-----------------------------------
new
-----------------------------------do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background --make-pidfile --chuid $EXEC_AS_USER --startas $DAEMON -- $DAEMON_ARGS || return 2
}
Posted 1 year ago # -
@Paulius Kulbokas
thanks, it works...
@the_guv
please fix it...
thanks
Posted 1 year ago # -
Yea, I followed the guide (thank you for this guide, btw. Bought my first VPS on Monday after years of shared hosting, it's been a tremendous amount of help) and went the php-fpm route, then on setting up multiple blogs it says to use FastCGI, so I followed the guide exactly, and now you are saying just to use php-fpm? It's confusing for people who don't understand this at all and are relying on this guide to help them. If one is outdated, it should be removed from the main guide and replaced with the recommended solution.
Posted 1 year ago # -
Just to clarify - I installed php-fpm following the link at the top of this page:
http://vpsbible.com/php/php-fastcgi-mysql-index/
Then continued with the Nginx install followed by the multiple sites set up.
On this page there is a section sayin Tweak Nginx for Fastcgi.
If I have installed PHP-fpm I can ignore this?
If so a quick note to that effect would help avoid any confusion (I got the unexpected || error)
Posted 10 months ago # -
yes Perry, the FastCGI route is different. This is explained in the PHP cover page but, sure, another note here's a good idea.
am rewriting all the docs now so will note this for that section.
Posted 10 months ago # -
Cheers - I think I came unstuck while jumping around within the tutorials.
Posted 10 months ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
