Coder Social home page Coder Social logo

Installation confusion about scalar HOT 3 CLOSED

anvc avatar anvc commented on August 24, 2024
Installation confusion

from scalar.

Comments (3)

craigdietrich avatar craigdietrich commented on August 24, 2024

Hi Stuart,

Thanks for your note! Is the alias you're setting up masking the URL? For example, even though the Scalar install is kept at /pathtoscalarfolder/scalar, is the URL that one would use to access Scalar something else, e.g., http://mydomain.com/?

If so, this will break Scalar's URL routing. Scalar, based on CodeIgniter's underlying URL routing, uses the first URL segment after the install folder (which can be the root folder /) to determine which Scalar "book" is presently being viewed. For example,

http://my-domain.com/scalar/book-url-segment/

If that 'book-url-segment' is masked, so not actually present in the URL, then Scalar would most likely not work properly, or at all.

Curious if this is in the right direction?

from scalar.

stuchalk avatar stuchalk commented on August 24, 2024

OK, I was able to solve my problem by editing the .htaccess file at the root of the scalar directory structure. I added RewriteBase /scalar after the initial RewriteEngine On rule. But I now have another problem. I now get the following error...

A PHP Error was encountered
Severity: 8192
Message: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead.
Filename: mysqli/mysqli_driver.php
Line Number: 304

Should I try to fix the PHP code (I use PHPStorm IDE) or just change the error_reporting level?

from scalar.

craigdietrich avatar craigdietrich commented on August 24, 2024

Hi @stuchalk

Thanks for sticking with this!

I would change the reporting level. CodeIgniter makes this kind of confusing since it takes over the error handling, so there's a couple places it can be adjusted: in system/application/config/config.php, you can set log_threshold to 0. But this doesn't always work (for example, on XAMPP I still get errors), in which case you can always adjust error_reporting(E_ALL) to something else in the front controller (codeigniter.php).

There's only one instance where mysql_escape_string is being used, and it's in CodeIgniter, which I don't like to touch. So, I'd recommend simply suppressing deprecation warnings. Actually, I just started the process of updating CodeIgniter, so with luck this will resolve itself in a future release. This is timely since PHP7 pretty much requires us to update CodeIgniter because of it's changes to object oriented syntax.

Thanks!

from scalar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.