USB Stick PHP Problems

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
stupidscript
-


Joined: 09 Aug 2019
Posts: 3

PostPosted: Sat Aug 10, 2019 12:37 am    Post subject: USB Stick PHP Problems Reply with quote

macOS Mojave running on a MacBook Air

I set up a fresh version of Abyss Web Server in my HDD Applications directory, then placed a fresh version of the PHP7 FastCGI binaries in the same Applications directory.

I updated the Abyss configuration to use the PHP interpreter, as described here: https://aprelium.com/abyssws/php.html

Restarted the web server, and no problem processing PHP files from the htdocs directory on my HDD.

I copied both folders from the HDD Applications folder to a new Applications folder on a USB stick, and adjusted abyss.conf to use the new paths.

Now, with attempts to read PHP files, I am receiving error 500 from the server, and FastCGI is throwing error #32 ... some lines from the FastCGI log, follow.

I don't know where to adjust any of the PHP FastCGI MAX settings I have read about, in this configuration, so I have not been able to try that suggestion.

Also, when running from the USB stick, Abyss dies randomly, and I'm including some of its log lines, below, as well. It ran fine from the HDD installation.

Any help from someone who has already done this? Thanks, in advance.

Here are a few of the Abyss log lines showing it failing:

Abyss Web Server X1 (v 2.12.1)

The server died unexpectedly (code=0xFFFFFFFF), it is being restarted automatically.
-- Default host on port 8080 is up and running (Local URL http://127.0.0.1:8080)

Typical FastCGI log file entries when trying to load a PHP file from the USB stick:

09/Aug/2019:16:20:49 -0700 SUID: 3 PUID: 3 RUID: 1 URI: /index.php Reading 8 bytes failed = Error #32
09/Aug/2019:16:20:51 -0700 SUID: 3 PUID: 3 Found dead
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 970

PostPosted: Sun Aug 11, 2019 11:57 am    Post subject: Re: USB Stick PHP Problems Reply with quote

stupidscript,

The reason is that the PHP preconfigured package for macOS we are making available is hardwired to only be installed under /Applications in the main HD of your computer. It can't work from any other location.

This is a shortcoming we're working on and hopefully the newest releases will be relocatable.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
stupidscript
-


Joined: 09 Aug 2019
Posts: 3

PostPosted: Sun Aug 11, 2019 2:55 pm    Post subject: Solved! Reply with quote

Thank you for your reply, and for posting my topic.

I have resolved the issue and now have Abyss+PHP7 running from a stick!

The issue was primarily that I needed to adjust the path to PHP extensions, in PHP7/lib/php.ini, just as I had done for Abyss in abyss.conf

On the stick, my structure is the same as it was when I first set it up on the HDD:

/Applications/Abyss Web Server
/Applications/PHP7

but I have changed the paths to the resources in the abyss.conf file and the path to extensions in php.ini to reflect the stick location, like this in abyss.conf:

/Volumes/USBStick/Applications/Abyss Web Server
/Volumes/USBStick/Applications/PHP7

I also cleaned out 4 oddball characters in php.ini, near the imap and sqllite entries, that were showing up as question marks ... maybe some sort of line-ending, or something.

So ... I first set Abyss and PHP7 up on the HDD in the Applications directory and, when everything was working fine, I copied Abyss/PHP7 folrders to the new Applications folder on the USB stick, adjusted paths in abyss.conf and php.ini, and we're good to go.

This also seems to have cleared up the intermittent Abyss dying issue, so, all good!

Thanks, again. It's working great, now.
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 970

PostPosted: Thu Aug 15, 2019 6:03 pm    Post subject: Re: Solved! Reply with quote

stupidscript,

Thank you for reporting back about your success. The "hardwired" statement was a bit vague and you have found the source of the problem which was the extensions path in php.ini.

There are probably other ways to do it but yours is the easier so far.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group