Edit

As outlined in the comments, there is no definitive solution to this, but the aim is to get as close as possible with what we have without “retrieving” the page. Please read comments before posting an answer to this bounty.

I’m using Codeigniter 3.1.9. I recently started using PHP7.2 and also sqlsrv driver to connect to a MSSQL database.

In some other post, someone mentioned that scrollable should be set to an option different than SQLSRV_CURSOR_FORWARD so I dump the value of $this->scrollable in sqlsrv_driver.php and found out that its value is buffered

But there are some validation rules for this field that are not working properly. Basically there are 4 things that should be validated:

the field is required

the quantity introduced by the user should be between min_participants and max_participants (min_participants and max_participants are columns in the registration_types table and means the minimum and maximum quantity that a user can select for a specific registration)

the user needs to at least select the quantity for a registration type available for the confernece and for the other registration types should be allowed to select “0”

but the user can´t introduce the quantity “0” for all registration types available in the conference

Issue: But its not working properly, if the user selects for example the quantity “1” for registration type “general” and for the registration type “plus” “0” it appears the validation error defined in the message() of the RegistrationTypeQuantity rule. But the user should be able to select only the quantity for 1 registration type.

Do you know how to solve that?

The RegistrationTypeQuantity rule that is used in the storeQuantities(), basically the quantities are sum and then is checked if the quantity is greater than 0:

If there are two registration types associated with the conference (general and plus), the registration type “general” has the column “min_participants” as “1” and max_participants as “1”, the the registration type “plus” has the column “min_participants” as “1” and max_participants as “2”.

If the user click “Next” in the select menu with quantity “0” for registration type “general” and quantity “0” for the registration type “plus” it should fail because the user needs to select at least the quantity for one registration type, because a registration needs to have some registration type(s) associated

If the user click “Next” in the select menu with quantity “2” for registration type “general” and quantity “0” for the registration type “plus” it should fail because “general” has “max_participants” as “1” and the user selected the quantity “2” (introduced 2 in the source code for example since in the select menu 2 should not appear for the registration type general, only should appear values between 1 and 1)

If the user click “Next” in the select menu with quantity “1” for registration type “general” and quantity “1” for the registration type “plus” it should pass

If the user click “Next” in the select menu with quantity “1” for registration type “general” and quantity “0” for the registration type “plus” it should pass because the user should be allowed do a registration without select quantities for all registration types, because the user might want to only do a registration in the registration type “general” and none in the registration type “plus”. So it should not be mandatory for the user select quantities for all registration types.

Bounty: 50

Overview: I have an application server running PHP 7, connecting to a separate database server running MongoDB 3.6.x using the MongoDB PHP userland library. I have firewall rules preventing access to the MongoDB server from all sources except the local and private interfaces (i.e. disallowing public IP access).

my_ca_signed_cert is a .pem file generated using my openssl-generated RSA private key, as well as the CA-provided .crt file, in the manner described in the MongoDB manual, e.g. cat mongodb.key mongodb.crt > mongodb.pem. my_ca_bundle is the .ca-bundle provided to me by the CA.

Additionally, the ca_bundle described in the PHP context is the same .ca-bundle file as in the MongoDB config.

This issue persists even if I comment out the CAFile line for the MongoDB config. Also of note is that I can connect successfully when setting allow_self_signed to true if CAFile is commented out, but not when it’s left uncommented.

Finally, when attempting to connect via the MongoDB shell, I get the following error:

Expected Behavior: I don’t want to use client certificate authentication for connecting to the database. All I want at present is for traffic to be encrypted. This means being able to connect to the database without allowing self-signed certificates.

Notes:

I have a cert set up successfully on the application server for HTTPS connectivity. Additionally, when testing the cert referenced in this question itself, I’ve successfully run verification on the files using openssl verify -CAfile /path/to/my_ca_bundle /path/to/my_ca_signed_cert.

Everything in my application code works when SSL is disabled or when enabled while allowing self-signed certs.

The documentation on all of this is incredibly vague on a number of points, so I’m not sure where my configuration is going wrong. What should I be looking into to resolve this problem?

Bounty: 50

Just went through all the steps listed on the Laravel site to install and get up and running for MacOS HighSierra. I currently have composer, Homebrew, valet, PHP 7.2.8, mySQL version 8.0.11 and Laravel 5.6.28 installed. I can create a new project by doing the Laravel new blog command and not have any problems. Also when I go to my browser I can see current project I just created or am working on. I can run the valet list command and so I know its running/working. I also can create a migration and have it show up in my project as well by running the php artisan make:migration test_test_test.

Warning: Unexpected character in input: '' (ASCII=1) state=1 in /usr/local/php-4.4.9/bin/php on line 277
Warning: Unexpected character in input: '' (ASCII=15) state=1 in /usr/local/php-4.4.9/bin/php on line 277
Parse error: syntax error, unexpected T_STRING in /usr/local/php-4.4.9/bin/php on line 277

which is exactly the output that one gets if one processes the php executable with itself, i.e. the output of

If I understand correctly, AddType tags any file ending in .php with MIME type application/x-httpd-php.

If PHP shall be run via CGI conventions, then the executable to run whenever a file with the MIME type application/x-httpd-php is requested is indicated with Action. The ScriptAlias gives an URL-path to the directory in which the php executable can be found. (This syntax sounds awkward though, why not have a single command for that?)

Additionally, the option ExecCGI has been set in the directory containing index.php and the SELinux contexts on that filesystem tree are marked with httpd_sys_script_exec_t.

Note that there is absolutely no

AddHandler cgi-script .php

in the configuration because THAT make Apache try to execute files ending in .php directly as scripts, which predictably fails with Error 500:

Bounty: 50

I just created WP site on my localhost machine and I am about to upload it to production server. Both environments run on the same OS with same libraries and php versions, but the password I set up for my local mysql install is different from the production server. So, I was thinking about uploading the entire WP file and once in the prod, I could alter the wp-config.php and changing the db, but this seems unmanageable in the long term if I have to pull the code to local again or migrate to another server …