PartKeepr icon indicating copy to clipboard operation
PartKeepr copied to clipboard

Initial Setup from Zip files on webpage CORS error

Open d0rf47 opened this issue 4 years ago • 12 comments

Hi.

I have just began trying to set up this tool and utilize it, however when I follow the installation instructions provided for the zip file I cannot get passed the first test due to browser CORS error.

I have configured an apache2 server inside linux mint and have it running, I have installed PHP and verified the installation. Is there something I am missing here.

image

d0rf47 avatar Feb 05 '21 17:02 d0rf47

You are not running the page through apache and PHP. I am even surprised, you got this far without an HTTP server.

The URL should not be file:// but http:// or https:// (if you have SSL certs available and installed). The file:// means you are accessing the files directly from the HDD instead of through the HTTP server.

christianlupus avatar Feb 05 '21 17:02 christianlupus

I added the will be closed tag as this will enable the stale bot. It will close the issue once you forget about it :grin:.

If you have further issues or questions, you can comment anytime. I will try to help you if possible. The first try would go at http://localhost/setup which is where I assume you need to navigate (depends on the setup). If you likn the instructions here, I might help better. Was it this file?

christianlupus avatar Feb 05 '21 17:02 christianlupus

Yes it was that file

d0rf47 avatar Feb 05 '21 18:02 d0rf47

How am i supposed to actually access the file through the server though? Do i need to build and run the actual project first? I have all the apache server configurations set up and php is installed.

d0rf47 avatar Feb 05 '21 18:02 d0rf47

OK, did you use the git version or a zip file? If you are using the git version, see the last section of this file

Where did you extract things (either git or the zip file)? /home/demo.partkeepr.org/PartKeepr? Is there a folder web underneath? You have DocumentRoot /home/demo.partkeepr.org/PartKeepr/web/ in the apache config?

What happens when you navigate to http://localhost and http://localhost/setup/?

christianlupus avatar Feb 05 '21 19:02 christianlupus

Using the zip file. I have all of the files unzipped into a directory within my download directory called "partkeepr-1.4.0" I went into the web folder and just opened the file. I think I need to add this "DocumentRoot /home/demo.partkeepr.org/PartKeepr/web/" I get a 404 when trying to go to any pages. image

Is there a specific place I need to add this line in apache.conf? DocumentRoot /home/demo.partkeepr.org/PartKeepr/web/ Also do i need to specify the above route as an alias?

d0rf47 avatar Feb 05 '21 19:02 d0rf47

Hey So I got the server set up and I can access the page now, but a new issue has surface. There appears to be an error in the javaScript

image image

Do you have any insight into this issue?

Thanks.

d0rf47 avatar Feb 05 '21 23:02 d0rf47

You need to run the setup first. This will generate the JS links. Instead of http://localhost/index.php you need to go to http://localhost/setup/index.php. This will open the setup page. Pass the steps of the assistant to prepare your installation of PartKeepr before you can use it.

christianlupus avatar Feb 06 '21 10:02 christianlupus

Hey thanks for all the help I was able to get to the database setup. But so i am trying to configure it with postgresql 12 and i know it says 11 is not supported so when i try the config it says "could not find driver". Does this mean it is impossible to use with the latest postgres database?

d0rf47 avatar Feb 08 '21 18:02 d0rf47

Most probably. I have not checked but PHP 7.1 might be incompatible with Postgres 12. You can run php -i on the console and look for the PDO for pgsql. If it is not there, you need to install a package or whatever. (I do not know what OS you are using.)

christianlupus avatar Feb 09 '21 13:02 christianlupus

Dear d0rf47 I collect several example of installation for PartKeepr that you can consult https://readthedocs.web.cern.ch/display/PARTK/Install+PartKeepr+on Regards

ghost-from-the-past avatar Mar 02 '21 23:03 ghost-from-the-past

Hi. I met the same problem and changed the line documentroot in the apache.conf, but still I couldn't open the setup page. This is my frist time using github and I'm totally new to programming or whatever this is but I downloaded wamp and change the allowoverride line following the instruction, is there anything I missed? Thanks for your patience and best wishes!

1

jietongz avatar Nov 18 '22 07:11 jietongz