Ubuntu-Lampp PHP path issue












1















I use Ubuntu 13.10 and Lampp.



When I try to run sudo php artisan job-daemon I get the above message. But when I run php artisan job-daemon it works just fine.



php -m gives me the following:



[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mhash
mssql
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sybase_ct
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]


which php gives me the following:



/opt/lampp/bin/php


Why do I get the message missing then?



I ran



johnnemo@johnnemo:~$ sudo nano .bashhrc


I added



export PATH=$PATH:/opt/lampp/bin/php


but still no luck....Any ideas..?



$PATH and sudo $PATH :



sudo: /opt/lampp/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: command not found


johnnemo@johnnemo:~$ $PATH
bash: /opt/lampp/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory









share|improve this question

























  • Try running sudo which php as the problem only exists when sudo was on the original command. This means it is probably a user related issue.

    – Julian Stirling
    Jan 1 '14 at 19:20











  • I get /usr/bin/php

    – John
    Jan 1 '14 at 19:22











  • So there is your answer ;)

    – Rinzwind
    Jan 1 '14 at 19:24











  • How can I change it for sudo to be the same...

    – John
    Jan 1 '14 at 19:25











  • Why are you using LAMPP over straight php from Ubuntu?

    – Marco Ceppi
    Jan 1 '14 at 19:26
















1















I use Ubuntu 13.10 and Lampp.



When I try to run sudo php artisan job-daemon I get the above message. But when I run php artisan job-daemon it works just fine.



php -m gives me the following:



[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mhash
mssql
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sybase_ct
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]


which php gives me the following:



/opt/lampp/bin/php


Why do I get the message missing then?



I ran



johnnemo@johnnemo:~$ sudo nano .bashhrc


I added



export PATH=$PATH:/opt/lampp/bin/php


but still no luck....Any ideas..?



$PATH and sudo $PATH :



sudo: /opt/lampp/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: command not found


johnnemo@johnnemo:~$ $PATH
bash: /opt/lampp/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory









share|improve this question

























  • Try running sudo which php as the problem only exists when sudo was on the original command. This means it is probably a user related issue.

    – Julian Stirling
    Jan 1 '14 at 19:20











  • I get /usr/bin/php

    – John
    Jan 1 '14 at 19:22











  • So there is your answer ;)

    – Rinzwind
    Jan 1 '14 at 19:24











  • How can I change it for sudo to be the same...

    – John
    Jan 1 '14 at 19:25











  • Why are you using LAMPP over straight php from Ubuntu?

    – Marco Ceppi
    Jan 1 '14 at 19:26














1












1








1








I use Ubuntu 13.10 and Lampp.



When I try to run sudo php artisan job-daemon I get the above message. But when I run php artisan job-daemon it works just fine.



php -m gives me the following:



[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mhash
mssql
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sybase_ct
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]


which php gives me the following:



/opt/lampp/bin/php


Why do I get the message missing then?



I ran



johnnemo@johnnemo:~$ sudo nano .bashhrc


I added



export PATH=$PATH:/opt/lampp/bin/php


but still no luck....Any ideas..?



$PATH and sudo $PATH :



sudo: /opt/lampp/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: command not found


johnnemo@johnnemo:~$ $PATH
bash: /opt/lampp/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory









share|improve this question
















I use Ubuntu 13.10 and Lampp.



When I try to run sudo php artisan job-daemon I get the above message. But when I run php artisan job-daemon it works just fine.



php -m gives me the following:



[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mhash
mssql
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sybase_ct
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]


which php gives me the following:



/opt/lampp/bin/php


Why do I get the message missing then?



I ran



johnnemo@johnnemo:~$ sudo nano .bashhrc


I added



export PATH=$PATH:/opt/lampp/bin/php


but still no luck....Any ideas..?



$PATH and sudo $PATH :



sudo: /opt/lampp/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: command not found


johnnemo@johnnemo:~$ $PATH
bash: /opt/lampp/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory






13.10 php lamp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 2 '14 at 12:32







John

















asked Jan 1 '14 at 19:16









JohnJohn

1316




1316













  • Try running sudo which php as the problem only exists when sudo was on the original command. This means it is probably a user related issue.

    – Julian Stirling
    Jan 1 '14 at 19:20











  • I get /usr/bin/php

    – John
    Jan 1 '14 at 19:22











  • So there is your answer ;)

    – Rinzwind
    Jan 1 '14 at 19:24











  • How can I change it for sudo to be the same...

    – John
    Jan 1 '14 at 19:25











  • Why are you using LAMPP over straight php from Ubuntu?

    – Marco Ceppi
    Jan 1 '14 at 19:26



















  • Try running sudo which php as the problem only exists when sudo was on the original command. This means it is probably a user related issue.

    – Julian Stirling
    Jan 1 '14 at 19:20











  • I get /usr/bin/php

    – John
    Jan 1 '14 at 19:22











  • So there is your answer ;)

    – Rinzwind
    Jan 1 '14 at 19:24











  • How can I change it for sudo to be the same...

    – John
    Jan 1 '14 at 19:25











  • Why are you using LAMPP over straight php from Ubuntu?

    – Marco Ceppi
    Jan 1 '14 at 19:26

















Try running sudo which php as the problem only exists when sudo was on the original command. This means it is probably a user related issue.

– Julian Stirling
Jan 1 '14 at 19:20





Try running sudo which php as the problem only exists when sudo was on the original command. This means it is probably a user related issue.

– Julian Stirling
Jan 1 '14 at 19:20













I get /usr/bin/php

– John
Jan 1 '14 at 19:22





I get /usr/bin/php

– John
Jan 1 '14 at 19:22













So there is your answer ;)

– Rinzwind
Jan 1 '14 at 19:24





So there is your answer ;)

– Rinzwind
Jan 1 '14 at 19:24













How can I change it for sudo to be the same...

– John
Jan 1 '14 at 19:25





How can I change it for sudo to be the same...

– John
Jan 1 '14 at 19:25













Why are you using LAMPP over straight php from Ubuntu?

– Marco Ceppi
Jan 1 '14 at 19:26





Why are you using LAMPP over straight php from Ubuntu?

– Marco Ceppi
Jan 1 '14 at 19:26










3 Answers
3






active

oldest

votes


















0














Look at this link:



mcrypt in Ubuntu 13.10



The PHP modules got moved from the conf.d directory to the mods-available directory, and the mcrypt module got left behind.






share|improve this answer


























  • So it is not a path problem..?But unlikely the other post when I run php-m I can see the mcrypt..

    – John
    Jan 1 '14 at 19:48





















0














OK so the problem is that the PATH is different for the User account and the root account. Try editing the rood bash profile file:



/root/.bashrc


At the bottom add the line



export PATH=$PATH:/opt/lampp/bin


To set the path for when sudo is running. Then source the profile:



sudo source /root/.bashrc





share|improve this answer


























  • I just opened it and there are so many things...What should I change..?

    – John
    Jan 1 '14 at 19:31











  • Sorry, I was unclear, edited above.

    – Julian Stirling
    Jan 1 '14 at 19:34











  • which php is still different than sudo which php

    – John
    Jan 1 '14 at 19:35











  • Try sourcing the new profile, see above.

    – Julian Stirling
    Jan 1 '14 at 19:40











  • No...I still have the same problem..

    – John
    Jan 1 '14 at 19:41



















0














export PATH=/opt/lampp/bin:$PATH


NOT



export PATH=$PATH:/opt/lampp/bin


Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN looks at the original paths.






share|improve this answer


























  • Explain why that would help!

    – guntbert
    Nov 11 '14 at 20:35











  • Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN look at the original paths.

    – Raza
    Nov 11 '14 at 23:27













  • The explanation belongs into the answer - you can edit it any time.

    – guntbert
    Nov 12 '14 at 8:22











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f398643%2fubuntu-lampp-php-path-issue%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Look at this link:



mcrypt in Ubuntu 13.10



The PHP modules got moved from the conf.d directory to the mods-available directory, and the mcrypt module got left behind.






share|improve this answer


























  • So it is not a path problem..?But unlikely the other post when I run php-m I can see the mcrypt..

    – John
    Jan 1 '14 at 19:48


















0














Look at this link:



mcrypt in Ubuntu 13.10



The PHP modules got moved from the conf.d directory to the mods-available directory, and the mcrypt module got left behind.






share|improve this answer


























  • So it is not a path problem..?But unlikely the other post when I run php-m I can see the mcrypt..

    – John
    Jan 1 '14 at 19:48
















0












0








0







Look at this link:



mcrypt in Ubuntu 13.10



The PHP modules got moved from the conf.d directory to the mods-available directory, and the mcrypt module got left behind.






share|improve this answer















Look at this link:



mcrypt in Ubuntu 13.10



The PHP modules got moved from the conf.d directory to the mods-available directory, and the mcrypt module got left behind.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 13 '17 at 12:24









Community

1




1










answered Jan 1 '14 at 19:46









Christopher PecoraroChristopher Pecoraro

11




11













  • So it is not a path problem..?But unlikely the other post when I run php-m I can see the mcrypt..

    – John
    Jan 1 '14 at 19:48





















  • So it is not a path problem..?But unlikely the other post when I run php-m I can see the mcrypt..

    – John
    Jan 1 '14 at 19:48



















So it is not a path problem..?But unlikely the other post when I run php-m I can see the mcrypt..

– John
Jan 1 '14 at 19:48







So it is not a path problem..?But unlikely the other post when I run php-m I can see the mcrypt..

– John
Jan 1 '14 at 19:48















0














OK so the problem is that the PATH is different for the User account and the root account. Try editing the rood bash profile file:



/root/.bashrc


At the bottom add the line



export PATH=$PATH:/opt/lampp/bin


To set the path for when sudo is running. Then source the profile:



sudo source /root/.bashrc





share|improve this answer


























  • I just opened it and there are so many things...What should I change..?

    – John
    Jan 1 '14 at 19:31











  • Sorry, I was unclear, edited above.

    – Julian Stirling
    Jan 1 '14 at 19:34











  • which php is still different than sudo which php

    – John
    Jan 1 '14 at 19:35











  • Try sourcing the new profile, see above.

    – Julian Stirling
    Jan 1 '14 at 19:40











  • No...I still have the same problem..

    – John
    Jan 1 '14 at 19:41
















0














OK so the problem is that the PATH is different for the User account and the root account. Try editing the rood bash profile file:



/root/.bashrc


At the bottom add the line



export PATH=$PATH:/opt/lampp/bin


To set the path for when sudo is running. Then source the profile:



sudo source /root/.bashrc





share|improve this answer


























  • I just opened it and there are so many things...What should I change..?

    – John
    Jan 1 '14 at 19:31











  • Sorry, I was unclear, edited above.

    – Julian Stirling
    Jan 1 '14 at 19:34











  • which php is still different than sudo which php

    – John
    Jan 1 '14 at 19:35











  • Try sourcing the new profile, see above.

    – Julian Stirling
    Jan 1 '14 at 19:40











  • No...I still have the same problem..

    – John
    Jan 1 '14 at 19:41














0












0








0







OK so the problem is that the PATH is different for the User account and the root account. Try editing the rood bash profile file:



/root/.bashrc


At the bottom add the line



export PATH=$PATH:/opt/lampp/bin


To set the path for when sudo is running. Then source the profile:



sudo source /root/.bashrc





share|improve this answer















OK so the problem is that the PATH is different for the User account and the root account. Try editing the rood bash profile file:



/root/.bashrc


At the bottom add the line



export PATH=$PATH:/opt/lampp/bin


To set the path for when sudo is running. Then source the profile:



sudo source /root/.bashrc






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 1 '14 at 19:59

























answered Jan 1 '14 at 19:29









Julian StirlingJulian Stirling

2,5971225




2,5971225













  • I just opened it and there are so many things...What should I change..?

    – John
    Jan 1 '14 at 19:31











  • Sorry, I was unclear, edited above.

    – Julian Stirling
    Jan 1 '14 at 19:34











  • which php is still different than sudo which php

    – John
    Jan 1 '14 at 19:35











  • Try sourcing the new profile, see above.

    – Julian Stirling
    Jan 1 '14 at 19:40











  • No...I still have the same problem..

    – John
    Jan 1 '14 at 19:41



















  • I just opened it and there are so many things...What should I change..?

    – John
    Jan 1 '14 at 19:31











  • Sorry, I was unclear, edited above.

    – Julian Stirling
    Jan 1 '14 at 19:34











  • which php is still different than sudo which php

    – John
    Jan 1 '14 at 19:35











  • Try sourcing the new profile, see above.

    – Julian Stirling
    Jan 1 '14 at 19:40











  • No...I still have the same problem..

    – John
    Jan 1 '14 at 19:41

















I just opened it and there are so many things...What should I change..?

– John
Jan 1 '14 at 19:31





I just opened it and there are so many things...What should I change..?

– John
Jan 1 '14 at 19:31













Sorry, I was unclear, edited above.

– Julian Stirling
Jan 1 '14 at 19:34





Sorry, I was unclear, edited above.

– Julian Stirling
Jan 1 '14 at 19:34













which php is still different than sudo which php

– John
Jan 1 '14 at 19:35





which php is still different than sudo which php

– John
Jan 1 '14 at 19:35













Try sourcing the new profile, see above.

– Julian Stirling
Jan 1 '14 at 19:40





Try sourcing the new profile, see above.

– Julian Stirling
Jan 1 '14 at 19:40













No...I still have the same problem..

– John
Jan 1 '14 at 19:41





No...I still have the same problem..

– John
Jan 1 '14 at 19:41











0














export PATH=/opt/lampp/bin:$PATH


NOT



export PATH=$PATH:/opt/lampp/bin


Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN looks at the original paths.






share|improve this answer


























  • Explain why that would help!

    – guntbert
    Nov 11 '14 at 20:35











  • Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN look at the original paths.

    – Raza
    Nov 11 '14 at 23:27













  • The explanation belongs into the answer - you can edit it any time.

    – guntbert
    Nov 12 '14 at 8:22
















0














export PATH=/opt/lampp/bin:$PATH


NOT



export PATH=$PATH:/opt/lampp/bin


Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN looks at the original paths.






share|improve this answer


























  • Explain why that would help!

    – guntbert
    Nov 11 '14 at 20:35











  • Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN look at the original paths.

    – Raza
    Nov 11 '14 at 23:27













  • The explanation belongs into the answer - you can edit it any time.

    – guntbert
    Nov 12 '14 at 8:22














0












0








0







export PATH=/opt/lampp/bin:$PATH


NOT



export PATH=$PATH:/opt/lampp/bin


Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN looks at the original paths.






share|improve this answer















export PATH=/opt/lampp/bin:$PATH


NOT



export PATH=$PATH:/opt/lampp/bin


Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN looks at the original paths.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 12 '14 at 21:59

























answered Nov 11 '14 at 20:08









RazaRaza

335139




335139













  • Explain why that would help!

    – guntbert
    Nov 11 '14 at 20:35











  • Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN look at the original paths.

    – Raza
    Nov 11 '14 at 23:27













  • The explanation belongs into the answer - you can edit it any time.

    – guntbert
    Nov 12 '14 at 8:22



















  • Explain why that would help!

    – guntbert
    Nov 11 '14 at 20:35











  • Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN look at the original paths.

    – Raza
    Nov 11 '14 at 23:27













  • The explanation belongs into the answer - you can edit it any time.

    – guntbert
    Nov 12 '14 at 8:22

















Explain why that would help!

– guntbert
Nov 11 '14 at 20:35





Explain why that would help!

– guntbert
Nov 11 '14 at 20:35













Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN look at the original paths.

– Raza
Nov 11 '14 at 23:27







Basically, the order matters. It now first looks in the /opt/lampp/bin folder to find certain executables and THEN look at the original paths.

– Raza
Nov 11 '14 at 23:27















The explanation belongs into the answer - you can edit it any time.

– guntbert
Nov 12 '14 at 8:22





The explanation belongs into the answer - you can edit it any time.

– guntbert
Nov 12 '14 at 8:22


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f398643%2fubuntu-lampp-php-path-issue%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?