PSP problem showing images

Discussion in 'Python' started by Alfons Nonell-Canals, Oct 27, 2009.

  1. Hello,
    I have experience working with Python an dnow I would like to use it for
    web development. I worked with php from several years ago and I'm trying
    to move to PSP. I have no problem runing some tests, implement an small
    project with psp is pretty easy. But I have only one problem, me scrips
    don't show any image.

    I developed a script which generates some images (is a work about
    Chemistry) and returns a page with some results and these images. When I
    run the script from the web browser, "all" works fine: the images are
    created, some other staff is calculated and the final page with the
    results is fine except the images. It does not print the images! I chech
    the paths and all is fine.

    With it I thought tha maybe there is something wrong in the apache's
    configuration. And I'm almost sure the problem is there because the
    Handler used only manages .psp documents. I add some code to not apply
    the Handler to .png but... help?

    Do you have any idea/experience?

    Below is the configuration of the host...

    <VirtualHost *:80>
    ServerAdmin
    ServerName www.domain.com
    ServerAlias domain.com

    # Indexes + Directory Root.
    DirectoryIndex index.psp
    DocumentRoot /path/to/the/pages
    <Directory /path/to/the/pages >
    AddHandler mod_python .psp
    PythonHandler mod_python.psp
    PythonDebug On
    <FilesMatch "\.(jpg|gif|png)$">
    Sethandler None
    </FilesMatch>
    </Directory>



    # Logfiles
    ErrorLog /var/log/apache2/domain.com-error.log
    CustomLog /var/log/apache2/domain.com-access.log combined
    </VirtualHost>


    Thanks in advance!

    Regards,
    Alfons.


    --
    ------------
    Alfons Nonell-Canals, PhD
    Chemogenomics Lab
    Research Group on Biomedical Informatics (GRIB) - IMIM/UPF
    Barcelona Biomedical Research Park (PRBB)
    C/ Doctor Aiguader, 88 - 08003 Barcelona
    - http://cgl.imim.es
    Tel. +34933160528

    http://alfons.elmeuportal.cat
    http://www.selenocisteina.info
     
    Alfons Nonell-Canals, Oct 27, 2009
    #1
    1. Advertising

  2. In message <>, Alfons
    Nonell-Canals wrote:

    > I developed a script which generates some images (is a work about
    > Chemistry) and returns a page with some results and these images. When I
    > run the script from the web browser, "all" works fine: the images are
    > created, some other staff is calculated and the final page with the
    > results is fine except the images. It does not print the images! I chech
    > the paths and all is fine.


    Did you view source to check the URLs in the “<IMG SRC="...">†directives?
    Did you try copying and pasting the image URLs directly into new
    windows/tabs, to see if they came up or you got an error page instead?
     
    Lawrence D'Oliveiro, Oct 27, 2009
    #2
    1. Advertising

  3. Hi Lawrence,
    Yes, I've tried it! I've saw the code, copyed the src path ans pasted
    into the browser and it works. I think it not works only unther a psp
    hostname/directory, for this reason I thought the problem is in the
    apache2 (site) configuration pasted in my mail...

    Thanks!
    Alfons.



    Lawrence D'Oliveiro wrote:
    > In message <>, Alfons
    > Nonell-Canals wrote:
    >
    >
    >> I developed a script which generates some images (is a work about
    >> Chemistry) and returns a page with some results and these images. When I
    >> run the script from the web browser, "all" works fine: the images are
    >> created, some other staff is calculated and the final page with the
    >> results is fine except the images. It does not print the images! I chech
    >> the paths and all is fine.
    >>

    >
    > Did you view source to check the URLs in the “<IMG SRC="...">†directives?
    > Did you try copying and pasting the image URLs directly into new
    > windows/tabs, to see if they came up or you got an error page instead?
    >


    --
    ------------
    Alfons Nonell-Canals, PhD
    Chemogenomics Lab
    Research Group on Biomedical Informatics (GRIB) - IMIM/UPF
    Barcelona Biomedical Research Park (PRBB)
    C/ Doctor Aiguader, 88 - 08003 Barcelona
    - http://cgl.imim.es
    Tel. +34933160528

    http://alfons.elmeuportal.cat
    http://www.selenocisteina.info
     
    Alfons Nonell-Canals, Oct 27, 2009
    #3
  4. Anybody of you have any idea?

    Alfons Nonell-Canals wrote:
    > Hi Lawrence,
    > Yes, I've tried it! I've saw the code, copyed the src path ans pasted
    > into the browser and it works. I think it not works only unther a psp
    > hostname/directory, for this reason I thought the problem is in the
    > apache2 (site) configuration pasted in my mail...
    >
    > Thanks!
    > Alfons.
    >
    >
    >
    > Lawrence D'Oliveiro wrote:
    >
    >> In message <>, Alfons
    >> Nonell-Canals wrote:
    >>
    >>
    >>
    >>> I developed a script which generates some images (is a work about
    >>> Chemistry) and returns a page with some results and these images. When I
    >>> run the script from the web browser, "all" works fine: the images are
    >>> created, some other staff is calculated and the final page with the
    >>> results is fine except the images. It does not print the images! I chech
    >>> the paths and all is fine.
    >>>
    >>>

    >> Did you view source to check the URLs in the “<IMG SRC="...">†directives?
    >> Did you try copying and pasting the image URLs directly into new
    >> windows/tabs, to see if they came up or you got an error page instead?
    >>
    >>

    >
    >


    --
    ------------
    Alfons Nonell-Canals, PhD
    Chemogenomics Lab
    Research Group on Biomedical Informatics (GRIB) - IMIM/UPF
    Barcelona Biomedical Research Park (PRBB)
    C/ Doctor Aiguader, 88 - 08003 Barcelona
    - http://cgl.imim.es
    Tel. +34933160528

    http://alfons.elmeuportal.cat
    http://www.selenocisteina.info
     
    Alfons Nonell-Canals, Oct 29, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rod Castellanos
    Replies:
    1
    Views:
    469
  2. Rod Castellanos
    Replies:
    2
    Views:
    777
    Steve Holden
    Jun 7, 2005
  3. Replies:
    1
    Views:
    473
  4. exhuma.twn
    Replies:
    3
    Views:
    347
    exhuma.twn
    Mar 20, 2006
  5. Replies:
    6
    Views:
    293
Loading...

Share This Page