Viewed   62 times

I am using WAMP. I want to use php from the command prompt. What is the entry in PATH env variable for this ?

 Answers

3

You need to put the directory that has php.exe in you WAMP installation into your PATH. It is usually something like C:wampxamppphp

Friday, August 5, 2022
2
  1. create a batch file to run your php script using php executable "C:wampphpphp.exe C:wampwwwindex.php"
  2. add this batch file in Scheduled Task in Windows control panel.
Sunday, December 11, 2022
 
pam_ix
 
3

if you mean apply a background color with your header function you should apply the fill color directly on the $pdf->rect function in TCPDF

Rect( $x, $y, $w, $h, $style = '', $border_style = array(), $fill_color = array() )

so in your case it would be

$this->Rect(0, 0, $this->getPageWidth(),    $this->getPageHeight(), 'DF', "",  array(220, 220, 200));

where you have to change the array in the last argument to apply your color

It don't work because on TCPDF the fill color , as far as i know, will apply on the cell and multicell function if you specified the fill argument on true

link on rect function TCPDF

foreach ($whatever as $data) {
    if($nextpage)
    {
         $this->Rect(0, 0, $this->getPageWidth(), $this->getPageHeight(), 
                   'DF', "",  array(220, 220, 200)); // where the array is the color expected
    }
}

but the better option is to define it in the header and use as the example 51 on TCPDF link to the example

public function Header() {
    // get the current page break margin
    $bMargin = $this->getBreakMargin();
    // get current auto-page-break mode
    $auto_page_break = $this->AutoPageBreak;
    // disable auto-page-break
    $this->SetAutoPageBreak(false, 0);
    // set bacground image
    $img_file = K_PATH_IMAGES.'image_demo.jpg';
    $this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0);
    // restore auto-page-break status
    $this->SetAutoPageBreak($auto_page_break, $bMargin);
    // set the starting point for the page content
    $this->setPageMark();
}

so here it's

public function Header() {
    // get the current page break margin
    $bMargin = $this->getBreakMargin();
    // get current auto-page-break mode
    $auto_page_break = $this->AutoPageBreak;
    // disable auto-page-break
    $this->SetAutoPageBreak(false, 0);
    $this->Rect(0, 0, $this->getPageWidth(), $this->getPageHeight(), 
               'DF', "",  array(220, 220, 200)); // where the array is the color expected
    $this->SetAutoPageBreak($auto_page_break, $bMargin);
    // set the starting point for the page content
    $this->setPageMark();
}
Thursday, November 3, 2022
 
4

This is not possible, and the documentation says so explicitly:

[...] The ability for a package author to determine where a package will be installed either through setting the path directly in their composer.json or through a dynamic package type: "type": "framework-install-here".

It has been proposed many times. Even implemented once early on and then removed. Installers won't do this because it would allow a single package author to wipe out entire folders without the user's consent. That user would then come here to yell at us.

(Emphasis mine)

The two keys you are using (installer-paths and installer-name) serve a different purpose than what you imagine:

  • installer-name: allows the package author (you) to say your package should be installed under a different directory than vendor/name. In your case, instead of being installed on vendor/demo/contentfeed, it would be installed under vendor/demo/packages (because of your setting in composer.json)
  • installer-paths: allows the package consumer to set a custom install path for a certain package or packages or package family. On a package composer.json has no effect, this setting is only for the project configuration.
Wednesday, December 7, 2022
 
mulya
 
3

You don't have to reboot the computer, just restart the apache and the php module will read the new ini.
Did you change the correct php.ini? In case of doubt

<?php echo 'php.ini: ', get_cfg_var('cfg_file_path'); ?>

can tell you.

Is there something in the error.log of the apache that indicates that something went wrong while loading php and the php_curl.dll?

Did you start the apache as a win32 service? If you did try to start it as a console application. Error messages will show up on the console then. Or start it as a service and take a look at the error.log file and the windows event log (start, run, eventvwr.msc /s).

edit:
"The specified procedure could not be found"
You need a dll that is compatible with your php version and build. Exactly what did you install and where did you get it from?

Monday, September 19, 2022
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :