Error Installing Chrome on Aws Ec2 Linux Instance: Scaling_Cur_Freq & Scaling_Max_Freq Not Found

Why can't I create a small Basic 64-bit Amazon Linux EC2 on AWS?

Original Answer: Currently Small only supports 32 bit operating systems. Change your AMI selection to something 32-bit based and small will then be an option.

Update 8 March 2012: Amazon announced that all instance types can now run 64 bit operating systems. They also announced a new medium class besides the existing high-cpu medium.

Trying to deploy a pyautogui crawler on AWS Ec2

The instructions you follow are for Amazon Linux, not Ubuntu. Below are steps that should work for Ubuntu (you may need to start with a new instance):

sudo apt update
sudo apt install unzip libnss3

cd /tmp/
wget https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/chromedriver
chromedriver -version

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

then

google-chrome -version && which google-chrome

gives:

Google Chrome 85.0.4183.83 
/usr/bin/google-chrome

PHP move_uploaded_file not working into public server

First of all check the permissions of the directory as mentioned in come of the comments.
If you have shell access "chmod 777 target_dir" or "chmod 707 target_dir" should be sufficient.

Second try to debug it using if's and the file_exists function(http://php.net/manual/en/function.file-exists.php).

Something like this.

$uploadedFile = $_FILES['fileField']['tmp_name'];
$destination = "../inventory_images/product_$newname";

if(file_exists($uploadedFile))
{
echo "file uploaded to temp dir";
}
else
{
echo "file upload failed";
exit();
}

if(move_uploaded_file($uploadedFile, $destination))
{
echo "upload complete";
}
else
{
echo "move_uploaded_file failed";
exit();
}

You can also check your current working directory by using the FILE or DIR constants(http://php.net/manual/en/language.constants.predefined.php).

Try this.

echo __FILE__;
echo dirname(__FILE__);
echo __DIR__;


Related Topics



Leave a reply



Submit