PHP did not return expected result / File not found

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Author
Message
rick89
Posts: 7
Joined: Sat Aug 03, 2019 4:41 am

Re: PHP did not return expected result / File not found

#31 Post by rick89 » Sat Aug 17, 2019 4:52 am

What’s the fix? I mean cacti has been working fine but as of 1.2 the checks are finding a problem that isn’t clear what is needed to fix. How do I troubleshoot?

netniV
Cacti Guru User
Posts: 2803
Joined: Sun Aug 27, 2017 12:05 am

Re: PHP did not return expected result / File not found

#32 Post by netniV » Sun Aug 18, 2019 9:25 am

Try doing this, within mysql:

Code: Select all

REPLACE INTO settings ('log_install','5');
Ensure you remove log/install-complete.log then run through the install until your problem email the install-complete.log to [email protected]

netniV
Cacti Guru User
Posts: 2803
Joined: Sun Aug 27, 2017 12:05 am

Re: PHP did not return expected result / File not found

#33 Post by netniV » Mon Aug 19, 2019 5:59 am

Can you do the following?

Code: Select all

ll /usr/bin/php
Then try this:

Code: Select all

/usr/bin/php <<cacti_path>>/install/cli_check.php 8
and post all the output here.

rick89
Posts: 7
Joined: Sat Aug 03, 2019 4:41 am

Re: PHP did not return expected result / File not found

#34 Post by rick89 » Thu Sep 19, 2019 2:23 pm

Tried a clean install of 1.2.6.
I added the log_install 5 to the db. I have emailed the logs over.

ll /usr/bin/php returned:
-rwxr-xr-x 1 root root 937 Aug 6 03:54 /usr/bin/php

/usr/bin/php .../install/cli_check.php 8 returned:

Content-type: text/html; charset=UTF-8

<br><strong>This script is only meant to run at the command line.</strong>

I also tried:
/usr/local/bin/php .../install/cli_check.php 8
/opt/cpanel/ea-php56/root/usr/bin/php .../install/cli_check.php 8

and these returned no result at all


rick89
Posts: 7
Joined: Sat Aug 03, 2019 4:41 am

Re: PHP did not return expected result / File not found

#36 Post by rick89 » Thu Sep 19, 2019 4:20 pm

Tried that but same result. Did the logs show anything obvious?


rick89
Posts: 7
Joined: Sat Aug 03, 2019 4:41 am

Re: PHP did not return expected result / File not found

#38 Post by rick89 » Fri Sep 20, 2019 4:47 am

It gives a result of 64 if I use a different php binary but the default php path you suggested gave the same message saying it’s only meant to be run at command line

netniV
Cacti Guru User
Posts: 2803
Joined: Sun Aug 27, 2017 12:05 am

Re: PHP did not return expected result / File not found

#39 Post by netniV » Fri Sep 20, 2019 5:55 am

OK, that would suggest then that your default php binary is operating in web mode for some reason. I would change your path_php_binary in the settings table to the other location though I am curious why the local bin version does operate in non-cli mode.

netniV
Cacti Guru User
Posts: 2803
Joined: Sun Aug 27, 2017 12:05 am

Re: PHP did not return expected result / File not found

#40 Post by netniV » Fri Sep 20, 2019 5:56 am

Is there any chance of having remote access to this system so I can actually compare the differences? If so, email me [email protected] and we can discuss as I would be curious if it's something that I can try and trap within the installation wizard.

Post Reply