Jump to content

is it ok for arch/nginx?


IggyP

Recommended Posts

trying to install a trial on this new server, but after entering the DB infos at 80% completed, it either loops back to start or goes to a white screen, depending what browser i tried...even reuploading files doesnt fix...i thought perhaps a php extention was missing or something...can anyone tell me what exact server requirement, or if it is even possible on arch/nginx?

 

thank you

Link to comment
Share on other sites

Welcome IggyP! Glad to see you made it to the forums.

We would ask that you create the error_log. It will help track down your difficulties.

During setup, CubeCart makes several tests for PHP version and extension compatibility, and if certain folder are writable. You will get a warning if there is a problem.

That said, there are certain things about the environment that cannot be tested through PHP functions.

I know there are sites being served with nginx. I don't know what 'arch' is.

For myself, see the details of my sig.

Link to comment
Share on other sites

i made it thru all the checks...to the last step at 80% with DB info entry....

 

i then tried on a centos server and it went in just fine no issues at all so im not sure what exactly, but this arch<< is arch linux and its a pretty highly customized server so it wont surprise me if an extension or package is missing somewhere...just couple days ago had to install xmlwriter for another site for example, which is pretty standard on most builds afaik...

 

i looked over one error log..had alot of things like>>

PHP Warning:  file_exists() [<a href='http://docs.php.net/manual/en/function.file-exists.php'>function.file-exists.php</a>]: open_basedir restriction in effect. File(/opt/chr_nginx/php-5.6.28/lib/php/smarty_internal_data.class.php) is not within the allowed path(s): (/home/mysiteblahblah/ssl:/home/mysiteblahblah/public_html:/home/mysite.com/test/tmp) in /home/siteblah.com/test/public_html/classes/autoloader.class.php on line 89
PHP Warning:  mysqli::query() [<a href='http://docs.php.net/manual/en/mysqli.query.php'>mysqli.query.php</a>]: Couldn't fetch mysqli in /home/mysite.com/test/public_html/classes/db/mysqli.class.php on line 203

 

like....over 1300 of those....then one of these at the end>>

 

PHP Fatal error:  Call to a member function fetch_assoc() on null in /home/mysite.com/test/public_html/classes/db/mysqli.class.php on line 124

 

Link to comment
Share on other sites

Lastly, enable the mysqli extension in PHP's PHP.INI configuration file. And make sure the extension is actually in PHP's extensions folder. (No reason to think it wouldn't be there.)

But its strange in that CubeCart seems to think the extension is there, and wants to use it, but somehow can't.

Run a phpinfo() command and see if there is a table for mysqli.

Firstly, I think a setting somewhere (I wouldn't know where) is including /opt/chr_nginx/php-5.6.28/lib/php in the operating system's "includes" environment variable, which PHP is picking up, letting that be the first directory PHP will search in for file-related functions. So, maybe re-examining the open_basedir list of directories is warranted. Unfortunately, I don't know that much about open_basedir, but HavenSwift Hosting does.

Link to comment
Share on other sites

We always use CENTOS as a rule on all shared hosting servers and customer dedicated servers unless something different is specifically requested by a dedicated client and that is because it works in most situations.  I don't have any experience of arch Linux either but the fact that your install works fine in CENTOS, it sounds like arch doesn't have components installed or configured correctly.  It is certainly strange the warnings you are getting with MySQLi as it appears that this isn't installed so would be interesting to know what phpinfo is reporting ?

open_basedir defines the locations or paths from which PHP is allowed to access files using functions such asfopen(). If a file is outside of the paths defined by open_basdir, PHP will refuse to open it. You can disable it but that is a big security risk but on a properly configured system it should not cause any issues.

if CENTOS is working fine for you then why not stick with that ?  The problems you are having are server configuration issues rather than anything to do with CubeCart itself

Ian

Link to comment
Share on other sites

the centos server is mine....this is for a client...

"open_basedir" is implemented as a security measure to prevent any server intrusion.
The script has access to given paths that allows it to function only not to tamper the server core files.

i believe you are mistaken and this is a cubecart 6.1.1 issue...

the 5.2.7 version installed without issue...

yes of course i have verified mysqli is indeed there, and there are several other sites working just fine with the same configs on the arch server so why would they not also have issue if it was a server cause?

i have employed a very skilled engineer but he says he will not fix a solution in your code for a commercial software.

at this time i must advise my client to try upgrading within cubecart 4 or 5, but if this can be fixed im sure it would be better to try the recent development

Link to comment
Share on other sites

1 hour ago, IggyP said:

i have employed a very skilled engineer but he says he will not fix a solution in your code for a commercial software.

Not sure if this was directed at myself or @bsmither but neither of us have anything to do directly with CubeCart Ltd and simply help out here - in addition CubeCart is open source since V6 and not commercial !

As CubeCart needs minimal server configuration on all common Linux distros, it stands to reason that it is something to do with Arch or your specific server configuration which is something you alluded to yourself earlier. It would be interesting to know what flaws your very skilled engineer says he found

Link to comment
Share on other sites

When you get the output of phpinfo(), please copy into this conversation the contents from the "Configure Command" in the top table.

Then, verify that in the Core table, the include_path starts with a period, then the path separator (for Linux, I think it is a colon?).

"Other sites are running on the Arch",

CubeCart installations? Or other applications, such as Wordpress? As sibling-sites?, or separated in a shared-server arrangement under the control of some kind of manager such as Cpanel?

We have found, in the latest couple of versions of CC6, usage of new code. One is MBSTRING, another is MemCached. These have perplexed us in that when compiling PHP for a given operating system, the implementations were incomplete. So, that's why we are asking for this information.

 

Link to comment
Share on other sites

heres a shot of the phpinfo sqli section...

the core table include_path is " .:/opt/chr_nginx/php-5.6.29/lib/php "

so far there is a vbulletin and also an xcart installation that is working...

all server and site management is done thru cli...

...it may be something relative to arch or this config, but still seems relevant to an issue in the core coding....our engineer has offered a hack solution, as he seems to have found one, but of course that would have to be reimplemented for each new update, so its not ideal...he told me the issue in confidence so im trying to remain respectful to all sides but if it helps i can tell you the discussion started with the words " For reference only, this is how you proper instantiate a database: "

 

btw fwiw, this is toward an upgrade from cc4 for a client who has been with cc for over a decade

sqli.jpg

Link to comment
Share on other sites

There is nothing obviously wrong with the mysqli configuration but the problem is probably with the configuration of your open_basedir settings and that is affecting mysqli.

I do not understand why you are being so secretive about what your expert is telling you - if you are paying him, then anything he finds out should be disclosed to you and then if you want help here then why not tell us - you are asking for help and being economical with the information you are giving us

Link to comment
Share on other sites

The error makes reference to the include path (which starts with a period, which means current working directory - public_html), so I don't know how it got to:
/opt/chr_nginx/php-5.6.28/lib/php/

But,

allowed path(s):
/home/mysiteblahblah/ssl
/home/mysiteblahblah/public_html
/home/mysite.com/test/tmp

in the script running in:
/home/siteblah.com/test/public_html/classes/autoloader.class.php on line 89

Please verify that a path that contains /test/ is in the collection of allowed paths.

I would think it would be, otherwise the very first include() should fail.

Link to comment
Share on other sites

i should note, that the /test directory refers to a subdomain that was setup...trials for this test installation were done on both the root url and a test.mysite.com subdomain but both failed exactly the same way...

 

im sorry, im not trying to be secretive but respectful...he told me the proper code for the sqli, but said that it was for my reference only and expressed an intention to not freely fix a commercial software...regardless of if i agree or not, i cant just turn around and tell you what he has asked me not too....i will ask him more about it again perhaps the open source version 6 would make a difference but im not sure....its still a commercial company correct? addons etc still cost right? not sure what difference it makes to him, but ill try asking again...fwiw it is vbulletins lead server tech, a devops specialist and system enginner he is pretty well versed but honestly some of it is over my head..

Link to comment
Share on other sites

Nobody is saying that it is beyond possibility that there are coding problems in CubeCart - we know there are plenty which are continually addressed via this forum and the git issue list.  However in all my years being involved with CubeCart (early V2) I have never come across an installation on Arch and the little that I know about it, I cannot understand why a client would run it on a commercial web server.  Without access to your server or more details of the issue, it is going to be difficult, for f not impossible to say what the problem is.

Link to comment
Share on other sites

Hi @IggyP I've stayed out of this conversation as I knew I would have nothing at all to add - WAY beyond my abilities!!!! Since you need to discuss this further with your engineer - perhaps the best thing to do at this point is to wait until you hear from him. We all hope you get a satisfactory solution to your issue!

Merry Christmas!

DB

Link to comment
Share on other sites

You mentioned, "perhaps the open source version 6 would make a difference." You also mentioned installing CC527.

CC611 is 100% human-readable and GPLv3. So, as far as being 'open source', CC611 is that.

Not so with CC527 unless and until /index.php and /admin.php are replaced with the files from CC5216.

But, I am still focused on solving the issue based on these error messages.

Link to comment
Share on other sites

there are many reasons to favor arch linux...after learning more about it, i think it seems more like a question of why more people DONT use it....the obvious answer is probably because things can be more complicated and needing manual work from cli rather than panels that many people use...which those panels are vulnerable to security or upgrade issues, hog resources etc and pack in much more than is needed...if you glance quickly at the internet, it might seem like arch is experimental or unstable, but its not the case...with proper scripts it is easy to manage.

Its rock solid, it was built for developers by developers with core thoughts in mind: security, performance, and modularity.

You need an app? You compile it. You do not rely on others. You get the latest software version. You get the latest software features. Security patches are issued within hours not days/weeks/years/never compared to other operating systems.

Moreover, you get access to all the new feature the developers add to their applications etc. Largest software packages database in the world. If ArchLinux Database does not have the software you are looking for (more than 43,000 software packages) then it probably doesnt exist.

Another advantage is that it is a rolling release, meaning you do not have to reinstall it to change to a higher version. You just update the packages and that is it.

This feedback comes from someone who used to recommend CentOS to his customers for years, but after he tried Archlinux he would not consider going back...

i think it is the future and will only become more popular as people learn about it.

 

as for this issue, i am happy to try and help you if i can reference any info for you or run a test etc its not a problem ;)

 

 

 

Link to comment
Share on other sites

But,

allowed path(s):
/home/mysiteblahblah/ssl
/home/mysiteblahblah/public_html
/home/mysite.com/test/tmp

in the script running in:
/home/siteblah.com/test/public_html/classes/autoloader.class.php on line 89

Please verify that a path that contains /test/ is in the collection of open_basedir allowed paths. (Actually, the third path does contain /test/, but it finishes with /tmp/, not /public_html/.) You overwrote part of the path in each of the paths of the allowed paths, so we cannot dismiss this possibility. I did not seem to get a solid response that the path /home/siteblah.com/test/public_html is actually one of those allowed paths.

In your explanation, the /test/ directory refers to a subdomain that was setup. Would open_basedir know anything about the domains that are pointing to a particular directory path?

When you get the output of phpinfo(), please let us know the contents from the "Configure Command" row in the top table.

Link to comment
Share on other sites

Something else I would like for you to look at:

In the mysqli table of phpinfo(), I see that the PHP.INI file has set as default the socket: /opt/chr_mysql/mysqld.sock

Please look at the file /includes/global.inc.php. There you will find details of the parameters to connect to the database.

Is there a statement that makes reference to $glob['dbsocket']? If there is a value here, it will be used instead of the INI value. And, does this socket file exist at this location?

In the table, I also see there is no default port. With a socket, but no port, I think therefore $glob['dbhost'] should be "localhost".

Link to comment
Share on other sites

ive got this reply from engineer>>

Nothing has been modified before installing their 5.x version. It worked out of the box.
I can guarantee it's not a open_basedir issue.

 

this test was completed on test.mysite.com ...

for whatever it might help....in my edit, i also removed a barrier directory so the actual path will be more like home/prison(barrier)/mysite.com/(www+subdomains)/public_html

the configure command row as follows>>

'./configure' '--prefix=/opt/chr_nginx/php-5.6.29' '--with-config-file-scan-dir=/opt/chr_nginx/phpconf/5.6.29/conf.d' '--with-config-file-path=/opt/chr_nginx/phpconf/5.6.29' '--disable-all' '--disable-ipv6' '--disable-debug' '--disable-cgi' '--enable-cli' '--disable-fileinfo' '--disable-inifile' '--disable-flatfile' '--enable-sockets' '--enable-soap' '--enable-ctype' '--enable-opcache' '--enable-xmlreader' '--enable-xmlwriter' '--enable-libxml' '--enable-xml' '--enable-simplexml' '--enable-session' '--enable-mbstring' '--enable-inline-optimization' '--enable-bcmath' '--enable-calendar' '--enable-tokenizer' '--enable-json' '--enable-filter' '--enable-dom' '--enable-mysqlnd-compression-support' '--enable-pdo' '--enable-ftp' '--enable-zip' '--enable-posix' '--enable-fpm' '--enable-phar' '--with-zlib' '--with-mysqli=mysqlnd' '--with-mysql=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-mcrypt' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-freetype-dir' '--with-xmlrpc' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-openssl' '--with-curl' '--with-mhash' '--with-iconv' '--with-pear' '--with-bz2' '--with-gmp' 'CFLAGS=-O3 '-march=core-avx-i' '-mno-ssse3' '-mno-sse3' '-pipe' '-fomit-frame-pointer''

 

during my cc6 tests, i tried both entering the "optional" sock and leaving it blank, both failed the same....i can confirm the sock file is in that location listed..

i checked the cc5 file also but of course it is blank in regard to that setting...

 

looking at global.inc.php now for a failed cc6 attempt...host and socket info are indeed correct and yes you are right the host is localhost

Link to comment
Share on other sites

If I didn't make myself clear earlier, I really don't know Linux -- period.

I have read that extensions get compiled into PHP when getting installed onto a Linux system. What then happens to the [Extensions] section in PHP.INI? I don't know.

According to this page: http://us1.php.net/manual/en/mysqli.installation.php, the mysqli extension is compiled using the stated configure option, but the Configuration Command shown above has the configure option syntax for PHP5.3.

I also see '--enable-pdo', so I assume this extension got installed, as well as having enabled a lot of other stuff.

So, if '--enable-pdo' is present, where is '--enable-mysqli'?

And what effect has '--disable-inifile'?

 

Can we say, with some trepidation, that the PHP package for Arch-Linux (if not already ready to go in the distro) is compiled to match Arch's "security, performance, and modularity", which some would then say PDO is the one and only legitimate means of connecting to a database?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...